Eclipse c++ OpenGL -不能构建项目
Eclipse C++ OpenGL - Cant Build Project
我刚刚在我的新PC上安装了Eclipse
(使用Mint 17.1
),并且到目前为止几乎每个项目都遇到这个错误。问题是,当我想启动我的项目时,我得到错误:
"发射失败了。没有找到二进制文件。"
我已经尝试构建项目,但随后我得到2个错误:
./src/main.o: undefined reference to symbol 'glEnable'
make: *** [OpenGL] Fehler 1
下面是控制台日志:
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)
我已经在网上搜索了解决方案,但我似乎找不到一个可行的解决方案。
根据您的错误日志,您没有链接-lGL
。尝试将它添加到链接器设置
相关文章:
- 无法在 CLion 中构建 C++ 项目
- 文本冒险游戏 - 如何区分一种项目类型与另一种项目类型以及如何构建项目类/子类
- 使用 Premake5 构建项目不会生成可执行文件或中间体
- 在OSx:ld上使用CMake构建C++项目:找不到体系结构x86_64的符号
- 无法从 bazel 使用 boost/iostream 构建项目包
- 如何使用MSBUILD V15构建C 项目
- 在Omnet 中构建项目时发生错误
- 如何一次在Visual Studio 2015和Visual Studio 2002中构建C 项目
- 在构建C++项目时提升相关错误
- Unity webGL - MacOS 上的构建项目失败
- 使用CMAKE,NINJA和CLANG构建项目,以竞争2019年
- 在使用Bazel Build构建项目期间,处理/选择界面的不同实现
- 当您的外部SDK仅具有.dll,.lib,.h文件时,如何链接和构建项目
- 尝试在Qt中升级Debian后构建项目
- 使用 Conan C/C++ 包管理器构建项目
- CMAKE:构建项目时执行C 文件
- 从VS2008升级后,VS2012中的构建项目显示错误
- OPENCV,使用CMAKE构建C 项目时的链接错误
- Eclipse 在添加 .h 和 .cpp 文件后不会构建项目
- 如何在Xcode4上从头开始构建C++项目-链接现有和新的外部库