简体   繁体   中英

Eclipse C++ OpenGL - Cant Build Project

I just installed Eclipse on my new PC (using Mint 17.1 ) and run into this error with almost every Project so far. The problem is that when I want to launch my project I get the error:

"Launch Failed. Binary not found."

I already tried to Build the project but then I get 2 errors:

./src/main.o: undefined reference to symbol 'glEnable'
make: *** [OpenGL] Fehler 1

Here is the console log:

01:49:45 **** Incremental Build of configuration Debug for project OpenGL ****
make all 
Building target: OpenGL
Invoking: GCC C++ Linker
g++ -L/usr/lib/ -L/usr/lib/x86_64-linux-gnu/mesa/ -o "OpenGL"  ./src/main.o   -lglut -lGLU

/usr/bin/ld: ./src/main.o: undefined reference to symbol 'glEnable'
//usr/lib/x86_64-linux-gnu/mesa/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [OpenGL] Fehler 1

01:49:45 Build Finished (took 127ms)

I already searched the web for solutions but I can't seem to find a solution that works.

Based on your error log, you haven't linked -lGL . Try adding it to your libraries in the Linker Settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM