[英]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. 我刚刚在新PC上安装了Eclipse
(使用Mint 17.1
),到目前为止,几乎所有Project都遇到了此错误。 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: 我已经尝试构建项目,但是随后出现2个错误:
./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
. 根据错误日志,您尚未链接-lGL
。 Try adding it to your libraries in the Linker Settings 尝试将其添加到链接器设置中的库中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.