2

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.

4
  • Just for clarification, there is a libpng.so in /usr/lib/i386-linux-gnu ? Commented Sep 30, 2013 at 13:53
  • Yes, ./usr/lib/i386-linux-gnu/libpng.so.3 exists. Commented Sep 30, 2013 at 14:08
  • Hm, seems like @lolando might be on the right track then. You need a libpng.so, which may be a symlink to libpng.so.3. Did you install the 32bit libs the official, Ubuntu-supported way? Commented Sep 30, 2013 at 14:11
  • Hi, creating symbolic links like libpng.so to libpng.so.3 truly worked. I dont have root access to the system so i dont know how it got installed. Commented Sep 30, 2013 at 14:31

1 Answer 1

1

Not sure if it helps, but i had some time ago a similar problem where some symbolic links were missing under /usr/lib/i386-linux-gnu. Perhaps you are facing a similar issue?

Sign up to request clarification or add additional context in comments.

1 Comment

Hi, as mentioned in the post above the creation of symbolic links worked so far. Thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.