2012-09-18 33 views
1

我可以在QtCreator中使用QtSDK x86 GCC和qmake編譯我的包(maliit)。我現在正在嘗試交叉編譯ARM的pacakge。Qt錯誤構建包'fromString'不是'QKeySequence'的成員

cd /home/user/project/output/buildroot/build/qt-4.8.1; PKG_CONFIG_SYSROOT_DIR="/home/user/project/output/buildroot/host/usr/arm-unknown-linux-gnueabi/sysroot" PKG_CONFIG="/home/user/project/output/buildroot/host/usr/bin/pkg-config" PKG_CONFIG_PATH="/home/user/project/output/buildroot/host/usr/arm-unknown-linux-gnueabi/sysroot/usr/lib/pkgconfig:" MAKEFLAGS="w -- -j1" ./configure -silent -force-pkg-config -separate-debug-info -xplatform qws/linux-arm-gnueabi-g++- -opensource -confirm-license -largefile -no-qt3support -nomake examples -nomake demos -depths 16,32 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-qvfb -qt-gfx-vnc -no-gfx-multiscreen -no-gfx-directfb -no-mouse-pc -no-mouse-linuxtp -qt-mouse-linuxinput -qt-mouse-tslib -no-mouse-qvfb -no-kbd-tty -qt-kbd-linuxinput -no-kbd-qvfb -debug -shared -little-endian -embedded arm -no-gif -no-libmng -system-zlib -qt-libjpeg -qt-libpng -no-libtiff -qt-freetype -dbus -qdbus -no-openssl -no-sql-sqlite -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -svg -no-webkit -no-script -no-scripttools -no-javascript-jit -no-stl -no-declarative -glib -no-gfx-qnx -no-kbd-qnx -no-mouse-qnx -no-xinerama -no-cups -no-nis -no-accessibility -prefix /usr -plugindir /usr/lib/qt/plugins -hostprefix /home/user/project/output/buildroot/host/usr/arm-unknown-linux-gnueabi/sysroot/usr -fast -no-rpath 

當我嘗試交叉編譯內QtCreator它使大約一半,然後錯誤出在下面的函數Q_EMIT線包:我的qmake和Qt庫採用以下配置與Buildroot裏面內置:

void GlibDBusIMServerProxy::onInvokeAction(const QString &action, 
              const QString &sequence) 
{ 
    Q_EMIT invokeAction(action, QKeySequence::fromString(sequence)); 
} 

文件絕對包括頭:

#include <QKeySequence> 

這裏是整個生成錯誤:

glibdbusimserverproxy.cpp: In member function 'void GlibDBusIMServerProxy::onInvokeAction(const QString&, const QString&)': 
glibdbusimserverproxy.cpp:230:33: error: 'fromString' is not a member of 'QKeySequence' 
make[1]: Leaving directory `/home/user/Desktop/maliit-framework/connection' 
make[1]: *** [.obj/glibdbusimserverproxy.o] Error 1 
make: Leaving directory `/home/user/Desktop/maliit-framework' 
make: *** [sub-connection-make_default-ordered] Error 2 
12:51:08: The process "/usr/bin/make" exited with code 2. 
Error while building project maliit-framework (target: Desktop) 
When executing build step 'Make' 

我可以在IDE中跟隨頭並沒有公開下正確的定義:

static QKeySequence fromString(const QString &str, SequenceFormat format = PortableText); 

出了什麼問題?我已經爲其他一些項目使用了交叉編譯的庫,並且對於這些項目工作正常。它怎麼能找不到'fromString'靜態方法?

回答

2

Qt configure命令的一個選項是導致定義QT_NO_SHORTCUT宏,該宏使用空類替換QKeySequence類的一般定義。

+0

完美 - 我的qconfig啓用了這個宏。謝謝 - – PhilBot

相關問題