在测试 罗技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包编译通过。