基于bluez or socketcan等 程序编译时注意事项
来源:互联网 发布:作业指导书制作软件 编辑:程序博客网 时间:2024/05/13 12:37
基于bluez程序编译时注意事项
第一:不要用到哪个Bluez头文件中定义的内容就只去包含这个头文件。而应该将bluetooth/bluetooth.h最先加入。类似:
//==================================
//bluetooth header file
#include <bluetooth/bluetooth.h> //BTPROTO_HCI
#include <bluetooth/hci.h> //struct hci_dev_info
#include <bluetooth/hci_lib.h> //hci_devid()
#include <bluetooth/l2cap.h> //l2cap
#include <bluetooth/hidp.h> //hidp
第二:因为Linux 下Bluetooth实现是通过socket来完成的。sa_family_t会被使用。
bluetooth/hci.h中就用到了。所以必须在include bluetooth header file之前,include socket header file.
#include <sys/types.h>
#include <sys/socket.h>
否则就会出现类似以下问题:
bluetooth/hci.h:1091: error: expected specifier-qualifier-list before 'sa_family_t'
转自:http://elsila.bokee.com/6978899.html
以上亦可用到socketcan中
- 基于bluez or socketcan等 程序编译时注意事项
- 基于bluez程序编译时注意事项
- 基于bluez程序编译时注意事项
- 基于bluez程序编译时注意事项
- 编译BlueZ
- SocketCAN
- SocketCAN
- SocketCAN
- 程序单独编译注意事项
- QT 环境下开发socketCan接口程序
- QT 环境下开发socketCan接口程序
- mini2440上编译bluez
- BlueZ的交叉编译
- 交叉编译bluez-4.95
- linux bluez编译
- openwrt 编译bluez-4.101
- BlueZ交叉编译
- 使用NDK 编译C/C++程序遇到 crtbegin_so.o: No such file or directory 等错误
- Makefile好助手:pkgconfig
- 云计算介绍之中国云计算元年
- Objective-C语法快速参考--(入门)
- SSH 无密码登录
- 在CSDN安家了。o(∩_∩)o 哈哈
- 基于bluez or socketcan等 程序编译时注意事项
- 云计算的运营方式
- 设计模式
- Debug Tool-01-JPDA体系
- 用Eclipse的TaskList功能进行任务管理(提高工作效率)
- 测试Cisco NAC解决方案
- JS 获得FileUpload1 的完整路径
- JNDI简介
- conflicting types for 'timer_t' 的解决