我正在用QT4编写应用程序。目前我已经安装了OpenSuse 11.4 x86_64。我需要为32位平台构建一个应用程序,因为我在这个版本中编译了一个包含的库。
在qt-Creator中,构建选项,我设置参数:-spec linux-g++-32
。
g++ -m32 -o Faktura main.o mainwindow.o timer.o QueryAtlasFactory.o
MySqlQueryAtlas.o moc_querythread.o moc_printthread.o
qrc_zasoby.o
-L/usr/lib64 /home/neon/workspace/qt4/Faktura/drukarki/elzab/elzabdr.a
-lQtSql -L/usr/lib64
-lQtGui
-L/usr/X11R6/lib64 -lQtCore
-lpthread
不幸的是,编译器正在链接64位库并返回错误:
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libQtSql.so when searching for -lQtSql
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../libQtSql.so when searching for -lQtSql
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libQtGui.so when searching for -lQtGui
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../libQtGui.so when searching for -lQtGui
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libQtCore.so when searching for -lQtCore
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../libQtCore.so when searching for -lQtCore
我系统中安装的qt4软件包列表:rpm -qa *qt*
libqt4-sql-mysql-4.7.1-7.2.x86_64
libqt4-devel-doc-data-4.7.1-7.1.noarch
kdevelop4-pg-qt-devel-0.9.0-3.1.x86_64
mono-qt-4.6.0-3.4.x86_64
libqt4-sql-32bit-4.7.1-7.1.x86_64
yast2-qt-pkg-2.20.3-3.1.x86_64
vlc-qt-1.1.8-1.pm.2.4.x86_64
libqt4-4.7.1-7.1.x86_64
libqt4-sql-mysql-32bit-4.7.1-7.2.x86_64
qtcurve-gtk2-32bit-1.8.1-3.1.x86_64
yast2-qt-2.20.4-1.2.1.x86_64
libqt4-devel-doc-4.7.1-7.3.x86_64
mono-qt-devel-4.6.0-3.4.x86_64
qt4-x11-tools-4.7.1-7.3.x86_64
libqt4-devel-4.7.1-7.1.x86_64
libqt4-sql-4.7.1-7.1.x86_64
libqt4-sql-sqlite-4.7.1-7.1.x86_64
libpackagekit-qt14-0.6.12-1.4.1.x86_64
python-qt4-4.8.3-3.2.x86_64
yast2-qt-graph-2.19.0-4.1.x86_64
qt-creator-2.1.0-1.3.1.x86_64
libqt4-qt3support-32bit-4.7.1-7.1.x86_64
libqt4-x11-4.7.1-7.1.x86_64
libpoppler-qt4-3-0.14.4-6.1.x86_64
libdbusmenu-qt2-0.6.6-3.1.x86_64
yast2-control-center-qt-2.20.2-1.3.1.x86_64
libqt4-x11-32bit-4.7.1-7.1.x86_64
qtcurve-gtk2-1.8.1-3.1.x86_64
kdevelop4-pg-qt-0.9.0-3.1.x86_64
qt4-qtscript-0.1.0-10.1.x86_64
libqt4-sql-unixODBC-4.7.1-7.2.x86_64
libqt4-sql-sqlite-32bit-4.7.1-7.1.x86_64
libqt4-32bit-4.7.1-7.1.x86_64
libpolkit-qt-1-1-0.99.1-5.1.x86_64
qt4-qtscript-doc-0.1.0-10.1.x86_64
libqt4-sql-unixODBC-32bit-4.7.1-7.2.x86_64
patterns-openSUSE-devel_qt4-11.4-6.9.1.x86_64
libqt4-qt3support-4.7.1-7.1.x86_64
pinentry-qt4-0.8.0-8.1.x86_64
问题是:我的系统中缺少什么来构建32位应用程序,或者我做错了什么?
答案 0 :(得分:0)
-L/usr/lib32
或-L/usr/lib
而不是-L/usr/lib64
呢?