网上能够找到很多关于BlueZ的文章,这里就不多介绍了。
我使用BlueZ是因为要播放音乐,并输出到蓝牙耳机。
我的环境是“Ubuntu 10.04”,因此匹配的BlueZ是4.60。
在BlueZ的README中,可以发现“
Compilation and installation
============================
In order to compile Bluetooth utilities you need following software packages:
- Linux Bluetooth protocol stack (BlueZ)
- GCC compiler
- D-Bus library
- GLib library
- USB library (optional)
- Lexical Analyzer (flex, lex)
- YACC (yacc, bison, byacc)
To configure run:
./configure --prefix=/usr --mandir=/usr/share/man /
--sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
Configure automatically searches for all required components and packages.
To compile and install run:
make && make install
”
前面的D-Bus、GLib等都是依赖的库,需要提前安装好。
但是D-Bus、GLib一定要与Linux系统匹配,否则将导致系统启动不了(GLib不匹配),或系统运行不正常(D-Bus不匹配)。
在进行“configure”时,最好加上 “--enable-tools --enable-test --enable-debug”,这样就可以:
1.编译tool目录下的文件
2.编译test目录下的文件
3.文件编译后可以输出log
原则上就能够正常编译BlueZ了。
我使用BlueZ是因为要播放音乐,并输出到蓝牙耳机。
我的环境是“Ubuntu 10.04”,因此匹配的BlueZ是4.60。
在BlueZ的README中,可以发现“
Compilation and installation
============================
In order to compile Bluetooth utilities you need following software packages:
- Linux Bluetooth protocol stack (BlueZ)
- GCC compiler
- D-Bus library
- GLib library
- USB library (optional)
- Lexical Analyzer (flex, lex)
- YACC (yacc, bison, byacc)
To configure run:
./configure --prefix=/usr --mandir=/usr/share/man /
--sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
Configure automatically searches for all required components and packages.
To compile and install run:
make && make install
”
前面的D-Bus、GLib等都是依赖的库,需要提前安装好。
但是D-Bus、GLib一定要与Linux系统匹配,否则将导致系统启动不了(GLib不匹配),或系统运行不正常(D-Bus不匹配)。
在进行“configure”时,最好加上 “--enable-tools --enable-test --enable-debug”,这样就可以:
1.编译tool目录下的文件
2.编译test目录下的文件
3.文件编译后可以输出log
原则上就能够正常编译BlueZ了。