fatal error: bluetooth/bluetooth.h: No such file or directory

在测试 罗技f710 驱动 在ros下的应用的时候,下载了最新的joy代码,编译的时候遇到一个这样的问题

fatal error: bluetooth/bluetooth.h: No such file or directory 

joystick_drivers/wiimote/include/wiimote/wiimote_controller.h:52:35: 
fatal error: cwiid.h: No such file or directory compilation terminated.

研究发现是有些库没有安装完全

解决方法:

sudo apt-get install libbluetooth-dev

执行过程中报错 ,fatal error: cwiid.h: No such file or directory

github https://github.com/abstrakraft/cwiid/tree/master下载cwiid源码 然后执行下列命令编译安装

$ aclocal
$ autoconf
$ ./configure
$ make
$ sudo make install

执行./configure 的时候,出现错误,configure:error:flex not found

$ ./configure 
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gawk... no
checking for mawk... mawk
checking for flex... no
checking for lex... no
configure: error: flex not found

解决办法:安装flex

$ sudo apt-get install flex

继续执行,提示error: bison not found

$ sudo apt-get install bison byacc

继续执行./configure 成功

然后 执行 make

虽然有一些warning 但是可以忽略

下一步 sudo make install ,安装成功

通过如下指令查看是否安装完成,加到库中:

$ whereis cwiid.h
cwiid: /usr/local/etc/cwiid /usr/local/lib/cwiid

问题解决。 joystick_driver 包中的wiimote包编译通过。

 

 

 

  • 5
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ppipp1109

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值