我正在尝试在Ubuntu 16.10上自行编译Dolphin模拟器,因为PIE存在兼容性问题。我认为这个问题适合SE,因为它看起来像配置问题而不是Dolphin的问题。
构建过程正常,直到OpenGL部分。第一个问题是由于缺少包含<GL/glx.h
而导致构建失败。我正在使用专有的Nvidia驱动程序,我发现这包含在/usr/include/nvidia-375
中。我试图通过在/usr/include
中创建一个符号链接来快速破解但是然后出现了另一个错误,看起来这个标题在某种程度上是不兼容的。我通过安装mesa-common-dev
摆脱了这个错误。 (这对我来说有点可疑)但是现在构建在链接阶段失败了:
(....snip....)
[ 63%] Built target videovulkan
[ 65%] Built target videosoftware
[ 65%] Built target videonull
[ 66%] Built target videoogl
[ 70%] Built target videocommon
[ 90%] Built target core
[ 91%] Built target uicommon
[ 91%] Linking CXX executable ../../../Binaries/dolphin-emu
../Common/libcommon.a(GLX.cpp.o): In function `cInterfaceGLX::ClearCurrent()':
GLX.cpp:(.text+0x3d): undefined reference to `glXMakeCurrent'
../Common/libcommon.a(GLX.cpp.o): In function `cInterfaceGLX::Shutdown()':
GLX.cpp:(.text+0x6b): undefined reference to `glXDestroyContext'
../Common/libcommon.a(GLX.cpp.o): In function `cInterfaceGLX::Create(void*, bool)':
GLX.cpp:(.text+0x11f): undefined reference to `glXQueryVersion'
GLX.cpp:(.text+0x1ee): undefined reference to `glXGetProcAddress'
GLX.cpp:(.text+0x314): undefined reference to `glXChooseFBConfig'
GLX.cpp:(.text+0x3d8): undefined reference to `glXGetVisualFromFBConfig'
../Common/libcommon.a(GLX.cpp.o): In function `cInterfaceGLX::MakeCurrent()':
GLX.cpp:(.text+0x6c9): undefined reference to `glXMakeCurrent'
../Common/libcommon.a(GLX.cpp.o): In function `cInterfaceGLX::GetFuncAddress(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>$
GLX.cpp:(.text+0x14): undefined reference to `glXGetProcAddress'
../Common/libcommon.a(GLX.cpp.o): In function `cInterfaceGLX::Swap()':
GLX.cpp:(.text+0x29): undefined reference to `glXSwapBuffers'
collect2: error: ld returned 1 exit status
Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/build.make:2343: recipe for target 'Binaries/dolphin-emu' failed
make[2]: *** [Binaries/dolphin-emu] Error 1
CMakeFiles/Makefile2:1531: recipe for target 'Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/all' failed
make[1]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
我对此错误的研究的唯一结果是编译器参数的顺序是错误的,但首先很难相信这一点,因为这意味着没有构建会成功。我不知道在哪里可以搜索这个,因为这个项目非常庞大,而且我对cmake只有基本的了解。
我的结论是,我必须忽略其他一些东西,但我无法弄清楚。这里出了什么问题?