按网上的方法,海思的工具链,老编译不过去,然后看了Makefile, 就在配置加上可以编译c++的交叉链。如:加上 CXX=arm-hisiv300-linux-g++
过程如下:
交叉编译 glib-2.16.2:
gye@ubuntu:~/tools/bt/bttool$ tar xvf glib-2.16.2.tar.gz
./configure -prefix=/opt/bluez-4.95 -host=arm-linux CC=arm-hisiv300-linux-gcc glib_cv_stack_grows=no glib_cv_uscore=yes glib_cv_have_qsort_r=yes ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes
出错:
checking libintl.h presence... no
checking for libintl.h... no
configure: error:
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
下载gettext-0.19.tar.gz
gye@ubuntu:~/tools/bt/bttool/gettext-0.19$ ./configure --prefix=/opt/bluez-4.95 --host=arm-linux CC=arm-hisiv300-linux-gcc CXX=arm-hisiv300-linux-g++
gye@ubuntu:~/tools/bt/bttool/gettext-0.19$ make