Hi All
I have a question on the compilation
Assume i am working on 64 bit Linux OS.
i am making shared objects and libraries required for our project.
Can i compile 32 bit libraries using gcc of 64 -bit OS?
Or
Is there any restriction in the 32-bit or 64-bit compilers when trying to link 32-bit libraries.
Let me know if i am not clear.
Regards
Dhana
Yes. -m32.
But let linker know a location of 32-bits libraries (you even might not have them installed yet).
I doubt how will you run a 32 bit file in 64 bit arch ?
or is this just compiling ?
Once you have all required 32-bit libraries you can run 32-bits executable on 64-bit OS.
Well-know example is skype.
How to dynamically modify the Library path in that case ?
Depends on your OS.
For Linux the simplests way is to set LD_LIBRARY_PATH.
For example
export LD_LIBRARY_PATH=/lib32:/usr/lib32