Archive for December, 2009

Compiling 32 bit programs on 64 bit OPENSUSE

December 2, 2009

Today, i was programming and i coded the statement below:
value = reinterpret_cast (element);
but i forgot that i was coding on an 64 bit machine and OS. when i compiled i got an error
like this:
Record.h:37: error: cast from ‘Buffer*’ to ‘U32’ loses precision
which was actually telling me that a pointer on a 64 bit OS is 8 byte not 4 byte. So i can’t have enough precision. Basically this reminded me that i am compiling this stuff on 64 bit computer and trying to reduce the 8 byte pointer into 4 bytes which is quite awkward.
So i tried to compile it using -m32 switch in 32 bits. But suddenly i got several errors like below:

“cannot find -lgcc_s”
“skipping incompatible …/”
“skipping incompatible …/libgcc.a when searching for -libgcc ”

Here i am gonna tell you the easiest way to correct these errors:
The only thing you have to do is go to YAST –> Software MANAGEMENT
after that you have to choose the Patterns options.

Choose the 32-Bit Runtime Environment Choose all of them and install.
If any confliction occurs, and you are not sure to install it , then don’t install it.
That’s all folks.
If you have such errors like above try to find the 32bit-devel libraries..

That’s all folks…

If you have different erros, please post below i will try to help.