2

我正在尝试使用以下选项为嵌入式 Linux 交叉编译 Qt:

(cd /home/user/proj/output/buildroot/build/company-qt-4.8.4; PKG_CONFIG_SYSROOT_DIR="/home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot" PKG_CONFIG="/home/user/proj/output/buildroot/host/usr/bin/pkg-config" PKG_CONFIG_PATH="/home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/pkgconfig:" MAKEFLAGS="w --  -j8" ./configure -silent -force-pkg-config -separate-debug-info -xplatform qws/linux-arm-gnueabi-g++-company -qconfig company -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 -system-libjpeg -qt-libpng -no-libtiff -system-freetype -I /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include/freetype2/ -dbus -qdbus -no-openssl -qt-sql-sqlite -xmlpatterns -exceptions -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -svg -webkit -script -no-scripttools -javascript-jit -stl -declarative -no-pch -glib -no-gfx-qnx -no-kbd-qnx -no-mouse-qnx -no-xinerama -no-cups -no-nis -no-accessibility -prefix /usr -hostprefix /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr -fast -no-rpath )

我真的需要嵌入式设备的 webkit,如果我在配置选项中包含“-webkit”,那么构建最终会失败,并出现以下回溯:

../../../../../include/QtCore/../../src/corelib/tools/qlist.h:418:17: error: invalid use of incomplete type ‘class QNetworkProxy’
In file included from ../../../../../include/QtNetwork/qnetworkaccessmanager.h:1:0,
                 from ../../../../../include/QtNetwork/QNetworkAccessManager:1,
                 from platform/network/qt/ProxyServerQt.cpp:32:
../../../../../include/QtNetwork/../../src/network/access/qnetworkaccessmanager.h:62:7: error: forward declaration of ‘class QNetworkProxy’
make[4]: *** [.obj/debug-static-emb-arm/ProxyServerQt.o] Error 1
make[4]: Leaving directory `/home/user/proj/output/buildroot/build/company-qt-4.8.4/src/3rdparty/webkit/Source/WebCore'
make[3]: *** [sub-WebCore-make_default-ordered] Error 2
make[3]: Leaving directory `/home/user/proj/output/buildroot/build/company-qt-4.8.4/src/3rdparty/webkit/Source'
make[2]: *** [sub-webkit-make_default-ordered] Error 2
make[2]: Leaving directory `/home/user/proj/output/buildroot/build/company-qt-4.8.4'
make[1]: *** [/home/user/proj/output/buildroot/build/company-qt-4.8.4/.stamp_built] Error 2
make[1]: Leaving directory `/home/user/proj/buildroot'

如果我只删除“-webkit”选项,那么构建完成就好了。

那么为什么我会收到 QNetworkProxy 错误,我该如何解决呢?谢谢!

编辑:请注意,我还尝试添加以下内容以明确包含 QNetworkProxy 但我得到完全相同的错误:

-feature-networkproxy
4

1 回答 1

2

我发现有一个包含以下定义的 qconfig.h 文件:

//Do not need this one
#ifndef QT_NO_NETWORKPROXY
#  define QT_NO_NETWORKPROXY
#endif

这显然是问题所在。

于 2013-03-25T19:22:04.717 回答