• 4743阅读
  • 1回复

[提问]请问qt4.7.1交叉编译CC设置问题 [复制链接]

上一主题 下一主题
离线alfree
 

只看楼主 倒序阅读 楼主  发表于: 2014-05-05
qws/linux-arm-g++中已经修改到了交叉编译链的绝对路径


如果CC设置为交叉编译链,make的时候会提示错误
../bootstrap/libbootstrap.a: could not readsymbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [../../../bin/moc] Error 1
make[1]: Leaving directory `/home/itt/qt-4.7.1-arm/src/tools/moc'
make: *** [sub-moc-install_subtargets-ordered]Error 2


如果unset CC,make 时候会提示错误:

/usr/bin/ld: skipping incompatible /usr/local/expat/lib/libdbus-1.so when searching for -ldbus-1
/usr/bin/ld: skipping incompatible /usr/local/expat/lib/libdbus-1.a when searching for -ldbus-1
/usr/bin/ld: skipping incompatible /usr/local/expat/lib/libdbus-1.so when searching for -ldbus-1
/usr/bin/ld: skipping incompatible /usr/local/expat/lib/libdbus-1.a when searching for -ldbus-1
/usr/bin/ld: cannot find -ldbus-1


请教大家该怎么解决啊?实在没办法了。


我的配置文件如下:
./configure  -force-pkg-config -qt-kbd-tty -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-multiscreen -qt-mouse-pc -no-gfx-qvfb -no-gfx-vnc -qt-kbd-tty -qt-gfx-linuxfb -no-gfx-qvfb -no-gfx-vnc -qt-mouse-tslib -no-glib -prefix /usr/local/Trolltech/qte4.6.3-arm -embedded arm -release -shared -fast -no-largefile -qt-sql-sqlite -qt3support -xmlpatterns -exceptions -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -webkit -qt-zlib -qt-gif -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -make libs -nomake tools -nomake examples -nomake docs -nomake demo -nis -no-cups -iconv -dbus -openssl -xplatform qws/linux-arm-g++ -little-endian -qt-freetype -depths 4,16,18,32 -I/usr/local/tslib/include -L/usr/local/tslib/lib -I/usr/local/expat/lib/dbus-1.0/include -I/usr/local/expat/include/dbus-1.0 -L/usr/local/expat/lib -ldbus-1 -lpthread -lrt -I/usr/local/openssl/include -L/usr/local/openssl/lib -v
离线jnny_cn

只看该作者 1楼 发表于: 2014-05-06
-I/usr/local/tslib/include -L/usr/local/tslib/lib -I/usr/local/expat/lib/dbus-1.0/include -I/usr/local/expat/include/dbus-1.0 -L/usr/local/expat/lib -ldbus-1 -lpthread -lrt -I/usr/local/openssl/include -L/usr/local/openssl/lib -v

以上路经里面的库文件确定是ARM架构的?(通过交叉编译得到的?)

如果是x86的那是一定不行的

交叉编译所用到的库文件必须和目标机架构一至
快速回复
限100 字节
 
上一个 下一个