交叉編譯obexd

2021-06-12 10:34:43 字數 3548 閱讀 3605

編譯obexd

解壓並進去

[root@localhost obexd-0.40]# cc=arm-linux-gcc ./configure cflags=-i/usr/local/newbt/include ldflags=-l/usr/local/newbt/lib --prefix=/usr/local/newbt --host=arm-linux

出現error:

checking for openobex... no

configure: error: libopenobex is required

[root@localhost openobex-1.3]# cc=arm-linux-gcc ./configure cflags=-i/usr/local/newbt/include ldflags=-l/usr/local/newbt/lib --prefix=/usr/local/newbt --host=arm-linux

[root@localhost openobex-1.3]#make

[root@localhost openobex-1.3]#make install

再一次編譯obexd

[root@localhost obexd-0.40]# cc=arm-linux-gcc ./configure cflags=-i/usr/local/newbt/include ldflags=-l/usr/local/newbt/lib --prefix=/usr/local/newbt --host=arm-linux

出現error:

checking for libical... no

configure: error: libical is required

[root@localhost libical-0.48]#cc=arm-linux-gcc ./configure cflags=-i/usr/local/newbt/include ldflags=-l/usr/local/newbt/lib --prefix=/usr/local/newbt --host=arm-linux

[root@localhost libical-0.48]#make

[root@localhost libical-0.48]#make install

編譯obexd——第三次

[root@localhost obexd-0.40]# cc=arm-linux-gcc ./configure cflags=-i/usr/local/newbt/include ldflags=-l/usr/local/newbt/lib --prefix=/usr/local/newbt --host=arm-linux

出現error:

/usr/local/newbt/include/bluetooth/bluetooth.h:127: error: conflicting types for 'bdaddr_t'

/usr/local/newbt/include/openobex/obex.h:56: error: previous declaration of 'bdaddr_t' was here

make[1]: *** [client/main.o] 錯誤 1

make: *** [all] 錯誤 2

解壓並進入

[root@localhost openobex-1.5]# cc=arm-linux-gcc ./configure cflags=-i/usr/local/newbt/include ldflags=-l/usr/local/newbt/lib --prefix=/usr/local/newbt --host=arm-linux

出現error:

checking for usb ... no

/usr/local/newbt/lib/pkgconfig/libusb.pc    configure: error: cannot check for file existence when cross compiling

解壓並進入

[root@localhost libusb-1.0.8]# cc=arm-linux-gcc ./configure cflags=-i/usr/local/newbt/include ldflags=-l/usr/local/newbt/lib --prefix=/usr/local/newbt --host=arm-linux

[root@localhost libusb-1.0.8]#make

[root@localhost libusb-1.0.8]#make install

再次編譯openobex-1.5

[root@localhost openobex-1.5]# cc=arm-linux-gcc ./configure cflags=-i/usr/local/newbt/include ldflags=-l/usr/local/newbt/lib usb_cflags=-i/usr/local/newbt/include usb_libs=-l/usr/local/newbt/lib --prefix=/usr/local/newbt --host=arm-linux

出現error:

checking for usb ... yes

/usr/local/newbt/lib/pkgconfig/libusb.pc    configure: error: cannot check for file existence when cross compiling

我確定已經有了libusb-1.0.pc  修改configure

找到libusb.pc將第11311行   # ; } 修改為 ;}

重新編譯成功

編譯obexd——第四次

[root@localhost obexd-0.40]# cc=arm-linux-gcc ./configure cflags=-i/usr/local/newbt/include ldflags=-l/usr/local/newbt/lib --prefix=/usr/local/newbt --host=arm-linux

[root@localhost obexd-0.40]#make

[root@localhost obexd-0.40]#make install

編譯 交叉編譯

交叉編譯含義 是指在乙個平台上生成另乙個平台上的可執行 同乙個體系結構可以執行不同的作業系統,同樣乙個作業系統也可以在不同的體系結構上執行 例 常說的x86 linux平台 指inter x86體系結構及linux for x86作業系統 x86 winnt平台 指inter x86體系結構及win...

交叉編譯(2) 交叉編譯鏈

什麼是交叉編譯鏈 明白了什麼是交叉編譯,那我們來看看什麼是交叉編譯鏈。首先編譯過程是按照不同的子功能,依照先後順序組成的乙個複雜的流程,如下圖 那麼編譯過程包括了預處理 編譯 彙編 鏈結等功能。既然有不同的子功能,那每個子功能都是乙個單獨的工具來實現,它們合在一起形成了乙個完整的工具集。同時編譯過程...

交叉編譯 Go 交叉編譯 跨平台編譯

golang 支援交叉編譯,在乙個平台上生成另乙個平台的可執行程式 cgo enabled 0 goos linux goarch amd64 go build main.go cgo enabled 0 goos windows goarch amd64 go build main.go cgo ...