ld: cannot find -lglut or -lGL or ... [SOLVED] I think

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
mdavidsaver
Atmospheric Pilot
Atmospheric Pilot
Posts: 1
Joined: Sun May 21, 2006 4:26 pm

ld: cannot find -lglut or -lGL or ... [SOLVED] I think

Post by mdavidsaver »

I was trying to get vs to compile from svn but it was giving me errors like

ld: cannot find -lglut

Of course I checked and /usr/lib/libglut.so was there, but libglut.a was not. libglut.a is looked for when then -static option is given to ld. It seems that the static flag is set by './configure --enable-release' which is what is used by the linux build scripts. Removing -static from configure.ac and rerunning ./bootstrap-sh && ./configure --enable-release && make worked.

The following should work. Check the diff output to make sure sed was not overzealous (it should only change one line).

$ sed -i.bak s/-static// configure.ac
$ diff configure.ac.bak configure.ac
$ ./bootstrap-sh
$ ./configure --enable-release
$ make

I looked through the forum and it looks like several people are/were having the same problem. It would seem to me to be a good idea to give -static its own configure argument (--enable-static perhaps) since static libraries are not necessarily available everywhere.
Post Reply