主题 : 在编译bluez-libs-2.25出错,求教 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 5099
精华: 0
发帖: 9
金钱: 90 两
威望: 70 点
综合积分: 18 分
注册时间: 2009-04-10
最后登录: 2012-09-17
楼主  发表于: 2009-11-28 21:41

 在编译bluez-libs-2.25出错,求教

最近交叉编译Bluez时遇到的问题,本人完全新手,最近在学校里做课题用到。。
./configure --build=i686 --host=arm-linux CC=arm-linux-gcc --target=arm-linux

后make出错,貌似是交叉编译器的问题,'USHRT_MAX' 没声明?如何解决??求教。不胜感激。

(所用环境:Fedora 12 . 交叉编译器:友善自带的)

以下错误信息:
sdp.c: In function 'sdp_data_alloc_with_length':

sdp.c:426: error: 'USHRT_MAX' undeclared (first use in this function)

sdp.c:426: error: (Each undeclared identifier is reported only once

sdp.c:426: error: for each function it appears in.)

sdp.c:435: error: 'UCHAR_MAX' undeclared (first use in this function)

sdp.c: In function 'sdp_append_to_buf':

sdp.c:2348: error: 'UCHAR_MAX' undeclared (first use in this function)

make[2]: *** [sdp.lo] Error 1

make[2]: Leaving directory `/root/bluez-libs-2.25/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/root/bluez-libs-2.25'

make: *** [all] Error 2
[ 此帖被wangqin456在2009-11-28 23:18重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-11-29 16:36
这种问题最有效的解决办法是google “sdp.c 'USHRT_MAX' undeclared”.
这是google出来的补丁:
http://www.bitshrine.org/gpp/bluez-libs-2.25-limits_h.patch
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 5099
精华: 0
发帖: 9
金钱: 90 两
威望: 70 点
综合积分: 18 分
注册时间: 2009-04-10
最后登录: 2012-09-17
2楼  发表于: 2009-12-05 17:53
谢谢版主。我回去试试。

上周改用bluez 3.33成功后没来看过。

今天发现版主的解答,谢谢啦

我一直习惯在百度上查,一直没找到。。