QT经典错误:/usr/include/qt4/QtCore/qatomic_i386.h:132: error: impossible constraint in 'asm'

来源:互联网 发布:数据库服务器ip地址 编辑:程序博客网 时间:2024/06/05 05:00

如果交叉编译为ARM的话,需要一个QT_ARCH_ARM的宏,

同理mips的宏为QT_ARCH_MIPS,

需要在你编译的时候给配置上。自己有耐心的话就去查查为什么这个宏变成了QT_ARCH_I386了。


我的错误原因是:Makefile里面QMAKE = 选项指定的qmake 路径错误。本来该 是/usr/local/Trolltech/QtEmbedded-4.6.3-arm/bin/qmake
 由于 我在为配置qmake路径前  就 make了一次 所以导致 QMAKE选项 一直是 /usr/bin/qmake。

(我配置好路径也make过了  但是 不知道为什么 新生成的Makefile里面 QMAKE= 选项没有被改过来)


所以rm 删除 Makefile 从新生产就可以了。


cc1plus: warning: include location "/usr/include/qt4/QtXml" is unsafe for cross-compilation
cc1plus: warning: include location "/usr/include/qt4/QtSql" is unsafe for cross-compilation
cc1plus: warning: include location "/usr/include/qt4" is unsafe for cross-compilation
/usr/include/qt4/QtCore/qatomic_i386.h: In destructor 'QString::~QString()':
/usr/include/qt4/QtCore/qatomic_i386.h:132: error: impossible constraint in 'asm'
make: *** [gprstest.o] Error 1

 

原创粉丝点击