2

我正在尝试测试名为Korge的 Kotlin 游戏引擎。我下载了默认的“Hello world!” 模板直接来自他们的网站。下载后,我使用 IDEA 从现有文件创建了一个新项目,并尝试运行名为“runNativeDebug”的 gradle 脚本。

我目前正在运行 Manjaro

uname -a

Linux lifeordeath-pc 4.19.45-1-MANJARO #1 SMP PREEMPT Wed May 22 17:16:41 UTC 2019 x86_64 GNU/Linux

我尝试从 AUR 存储库下载 openal、lib32-openal 和 freeglut。确实安装了库,这可以从以下内容中看出

ls /usr/lib | grep -E "glu|openal"
libglui.a
libglui.so.2
libglut.so
libglut.so.3
libglut.so.3.10.0
libopenal.a
libopenal.so
libopenal.so.1
libopenal.so.1.19.1

这是头文件位置

ls /usr/include/GL | grep gl
freeglut_ext.h
freeglut.h
freeglut_std.h
glcorearb.h
glew.h
glext.h
gl.h
gl_mangle.h
glu.h
glui.h
glu_mangle.h
glut.h
glxew.h
glxext.h
glx.h
glxint.h
glx_mangle.h
glxmd.h
glxproto.h
glxtokens.h
wglew.h

下载模板并运行它。

我希望代码能够运行,但是在单击运行按钮时,出现以下错误:

/home/lifeordeath/.konan/dependencies/clang-llvm-6.0.1-linux-x86-64/bin/ld.lld: error: unable to find library -lGL
/home/lifeordeath/.konan/dependencies/clang-llvm-6.0.1-linux-x86-64/bin/ld.lld: error: unable to find library -lGLU
/home/lifeordeath/.konan/dependencies/clang-llvm-6.0.1-linux-x86-6 /bin/ld.lld: error: unable to find library -lglut
/home/lifeordeath/.konan/dependencies/clang-llvm-6.0.1-linux-x86-64/bin/ld.lld: error: unable to find library -lopenal
error: /home/lifeordeath/.konan/dependencies/clang-llvm-6.0.1-linux-x86-64/bin/ld.lld invocation reported errors

此外,模板的 JS 构建完美无缺。

4

1 回答 1

3

如果其他人在 Ubuntu 等基于 Debian 的发行版上遇到此问题:

解决方案在这里:https ://korlibs.soywiz.com/korge/targets/desktop/

sudo apt-get -y install freeglut3-dev libopenal-dev

于 2020-06-03T22:16:35.157 回答