我正在尝试从libfreenect2编译libfreenect2,结果是当我在步骤5中完成cmake CMakeLists.txt后运行make文件时,我一直有以下错误:
Linking CXX executable /home/lex/libfreenect2/examples/protonect/bin/Protonect
/home/lex/libfreenect2/examples/protonect/lib/libfreenect2.so: undefined reference to `XF86VidModeQueryExtension'
/home/lex/libfreenect2/examples/protonect/lib/libfreenect2.so: undefined reference to `XF86VidModeGetGammaRampSize'
/home/lex/libfreenect2/examples/protonect/lib/libfreenect2.so: undefined reference to `XF86VidModeGetGammaRamp'
/home/lex/libfreenect2/examples/protonect/lib/libfreenect2.so: undefined reference to `XF86VidModeSetGammaRamp'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/lex/libfreenect2/examples/protonect/bin/Protonect] Error 1
make[1]: *** [CMakeFiles/Protonect.dir/all] Error 2
make: *** [all] Error 2
有没有人知道如何解决这个问题?
答案 0 :(得分:1)
您的程序似乎依赖于libXxf86vm。您需要添加类似
的内容-lXxf86vm
到链接命令行。请务必安装开发包。我很惊讶CMakeLists.txt没有这个。
答案 1 :(得分:0)
安装Mesa3D似乎解决了我的问题。这可能与cmake安装期间libfreenect2的依赖关系有关。