首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CMake + freeglut3:找不到usbhid.h

CMake + freeglut3:找不到usbhid.h
EN

Stack Overflow用户
提问于 2016-05-10 17:01:49
回答 1查看 1K关注 0票数 1

系统:我使用LinuxMint17.3作为VB在MaxOS10.11.3系统上使用.

问题: Id希望编译freeglut3.0.0

问题: cmake给了我一个致命的错误: usbhid.h:没有这样的文件或目录

你好,

问题是,即使在安装了所有依赖项之后,我也无法在我的系统上找到这个文件。经过研究,我发现这与一些usb驱动程序有关。这可能是因为它与VB系统没有“实际的”usb硬件有关吗?还是我错过了一个包裹。

我安装了libgl1-mesa-dev,libxi 11-dev,libxrandr dev和libxi-dev。

我在这里附上了CMakeError.log

代码语言:javascript
复制
Determining if files usbhid.h exist failed with the following output:
Change Dir: /opt/freeglut-3.0.0/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec2451224769/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2451224769.dir/build.make CMakeFiles/cmTryCompileExec2451224769.dir/build
make[1]: Entering directory `/opt/freeglut-3.0.0/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /opt/freeglut-3.0.0/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2451224769.dir/CheckIncludeFiles.c.o
/usr/bin/cc   -Wall -pedantic    -o CMakeFiles/cmTryCompileExec2451224769.dir/CheckIncludeFiles.c.o   -c /opt/freeglut-3.0.0/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/opt/freeglut-3.0.0/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:20: fatal error: usbhid.h: No such file or directory
 #include <usbhid.h>
                    ^
compilation terminated.
make[1]: Leaving directory `/opt/freeglut-3.0.0/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec2451224769.dir/CheckIncludeFiles.c.o] Error 1
make: *** [cmTryCompileExec2451224769/fast] Error 2

Source:
/* */
#include <usbhid.h>


int main(){return 0;}

Determining if the function XParseGeometry exists failed with the following output:
Change Dir: /opt/freeglut-3.0.0/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec2875944840/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2875944840.dir/build.make CMakeFiles/cmTryCompileExec2875944840.dir/build
make[1]: Entering directory `/opt/freeglut-3.0.0/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /opt/freeglut-3.0.0/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2875944840.dir/CheckFunctionExists.c.o
/usr/bin/cc   -Wall -pedantic -DCHECK_FUNCTION_EXISTS=XParseGeometry   -o CMakeFiles/cmTryCompileExec2875944840.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-2.8/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec2875944840
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2875944840.dir/link.txt --verbose=1
/usr/bin/cc   -Wall -pedantic -DCHECK_FUNCTION_EXISTS=XParseGeometry    CMakeFiles/cmTryCompileExec2875944840.dir/CheckFunctionExists.c.o  -o cmTryCompileExec2875944840 -rdynamic -lm 
CMakeFiles/cmTryCompileExec2875944840.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x15): undefined reference to `XParseGeometry'
collect2: error: ld returned 1 exit status
make[1]: Leaving directory `/opt/freeglut-3.0.0/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec2875944840] Error 1
make: *** [cmTryCompileExec2875944840/fast] Error 2

我不知道如何为自己找到解决办法,所以我在这里问。

提前感谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-05-13 15:35:14

usbhid.h:请安装libusbhid-dev‘’:$ sudo apt-get install libusbhid-dev

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37144745

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档