Sign in to follow this  
titanandrews

Linker error when building Simple from Beginning OpenGL Game Programming

Recommended Posts

Hi All, I am trying to build the Simple program from Chapter 1 of Beginning OpenGL Game Programming on Linux with gcc, but I am getting a linker error. Here is the compiler/linker output: Building file: ../src/Simple.cpp Invoking: GCC C++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 -osrc/Simple.o ../src/Simple.cpp Finished building: ../src/Simple.cpp Building target: Simple Invoking: GCC C++ Linker g++ -L/usr/local/lib/ -oSimple ./src/Simple.o -llibglut /usr/bin/ld: cannot find -llibglut collect2: ld returned 1 exit status make: *** [Simple] Error 1 make: Target `all' not remade because of errors. Build complete for project Simple The libglut.so library exists in /usr/local/lib/ which is exactly what I specified with -L, so I really don't see what the problem is. Can someone please help me with this? many many thanks to you!!! -B

Share this post


Link to post
Share on other sites
Sorry... I forgot about the naming conventions. It's been a while since doing C++. I removed the prefix lib, and now it works. Thanks anyway!

BTW, I tried deleting the post but for some reason it didn't work.

On to gaming!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this