i'm currently trying to compile some code as 32bit on a 64bit Ubuntu 12.04 machine. If i compile the code with the normal make command it all works fine.
Now, in order to compile it as 32bit i added the -m32 option to the C- & CXXFLAGS. Works fine until i get some errors about missing librarys like -lGL, -lGLU, -lX11, -lXext, -lpng. Okay, the first lib (-lGL) I found in /usr/lib32/nvidia-304 which i added via the -L option. The other libs are all found in /usr/lib/i386-linux-gnu but adding that via -L does not solve a thing.
What am I missing here? Thanks in advance!
Here is the full gcc-command leading to the error
gcc myprog.o -m32 (...) -lX11 -lXext -lpng -lm -L/usr/lib/i386-linux-gnu -lGL -L/usr/lib32/nvidia-304 -lpthread -o myprog /usr/bin/ld: cannot find -lX11 /usr/bin/ld: cannot find -lXext /usr/bin/ld: cannot find -lpng Another thing: In the /usr/lib32/nvidia-304 i found a libGL.so PLUS an libGL.la while in /usr/lib/i386-linux-gnu I only can find .so files.
libpng.soin/usr/lib/i386-linux-gnu?./usr/lib/i386-linux-gnu/libpng.so.3exists.libpng.so, which may be a symlink tolibpng.so.3. Did you install the 32bit libs the official, Ubuntu-supported way?libpng.sotolibpng.so.3truly worked. I dont have root access to the system so i dont know how it got installed.