我想学习用 irrlicht 3d 引擎和代码块/c++ 制作游戏。我安装了代码块,我遵循了来自各种来源的 Irrlicht 说明,我目前的问题如下。
这些是在按照以下 youtube 视频中的说明尝试编译来自 irrlicht 03.CustomSceneNode main.cpp 的代码时,来自代码块的构建消息:https ://www.youtube.com/watch?v=1n9mWN60xqI :
===============================================================
Build: Debug in testing (compiler: GNU GCC Compiler)
ld cannot find -lIrrlicht
ld cannot find -lGL
ld cannot find -lGLU
ld cannot find -lIrrlicht
ld cannot find -lXxf86vn
ld cannot find -lGL
error: ld returned 1 exit status|
Build failed: 7 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
===============================================================
我不知道如何解决“ld 找不到 -lIrrlicht”的问题。Irrlicht 成立了两次。第一次从他们的网站下载,第二次通过终端上我在论坛中找到的说明(我忘了在哪里),我对它们都运行了 make 并使用视频中的说明将它们设置在代码块中。
此外,我显然缺少必要的 openGL 库或它们未正确链接,但我无法安装它们。当我尝试时,这是终端输出:
==================================================== ==============
~$ sudo apt-get install libgl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libgl1-mesa-dev' instead of 'libgl-dev'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgl1-mesa-dev : Depends: libglvnd-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages
==================================================== ==============
我已经安装了以下库:
libxxf86vm-dev
libxcomposite-dev
mesa-common-dev
,在再次尝试使用 GL 库之前将其删除,但这并没有改变任何东西。
我想将代码块设置到可以编译示例程序的程度。