-1

我正在 Ubuntu 12.04.1 32 位上编译 Qt-Everywhere 4.6.3 以在 mini2440 上使用。我能够qmake为 mini2440 编译,但未能为我的笔记本电脑编译以进行测试。./configure没有给我任何错误(我必须安装libx11-dev&libXext-dev才能这样做)。但是在运行make时,我遇到了许多链接器错误,例如:

.obj/release-shared/qpaintengine_x11.o:在函数“QX11PaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&)”中:
qpaintengine_x11.cpp:(.text+0x25fb): 未定义对“XCopyArea”的引用
qpaintengine_x11.cpp:(.text+0x264c): 对“XSetClipOrigin”的未定义引用
qpaintengine_x11.cpp:(.text+0x2691): 未定义对“XSetClipMask”的引用
qpaintengine_x11.cpp:(.text+0x2723): 未定义对“XCopyArea”的引用
qpaintengine_x11.cpp:(.text+0x2871): 未定义对“XSetClipRectangles”的引用
qpaintengine_x11.cpp:(.text+0x28bf): 未定义对“XCreatePixmap”的引用
qpaintengine_x11.cpp:(.text+0x28e2): 未定义对“XCreateGC”的引用
qpaintengine_x11.cpp:(.text+0x28fd): 未定义对“XSetForeground”的引用
qpaintengine_x11.cpp:(.text+0x2934): 未定义对“XFillRectangle”的引用
qpaintengine_x11.cpp:(.text+0x2989): 未定义对“XSetClipRectangles”的引用
qpaintengine_x11.cpp:(.text+0x29dc): 未定义对“XCopyArea”的引用
qpaintengine_x11.cpp:(.text+0x29ef): 未定义对“XFreeGC”的引用
qpaintengine_x11.cpp:(.text+0x2a0c): 未定义对“XSetClipMask”的引用
qpaintengine_x11.cpp:(.text+0x2a31): 未定义对“XSetClipOrigin”的引用
qpaintengine_x11.cpp:(.text+0x2a44): 未定义对“XFreePixmap”的引用
qpaintengine_x11.cpp:(.text+0x2ab4): 未定义对“XSetForeground”的引用
qpaintengine_x11.cpp:(.text+0x2b16): 未定义对“XCreateGC”的引用
qpaintengine_x11.cpp:(.text+0x2b31): 对“XSetForeground”的未定义引用
qpaintengine_x11.cpp:(.text+0x2b70): 未定义对“XFillRectangle”的引用
qpaintengine_x11.cpp:(.text+0x2b8b): 对“XSetBackground”的未定义引用
qpaintengine_x11.cpp:(.text+0x2ba6): 对“XSetForeground”的未定义引用
qpaintengine_x11.cpp:(.text+0x2be8): 未定义对“XSetFillStyle”的引用
qpaintengine_x11.cpp:(.text+0x2c0f): 未定义对“XSetTSOrigin”的引用
qpaintengine_x11.cpp:(.text+0x2c30): 未定义对“XSetStipple”的引用
qpaintengine_x11.cpp:(.text+0x2c6f): 未定义对“XFillRectangle”的引用
qpaintengine_x11.cpp:(.text+0x2c82): undefined reference to `XFreeGC'
qpaintengine_x11.cpp:(.text+0x2ca7): 未定义对“XSetClipOrigin”的引用
qpaintengine_x11.cpp:(.text+0x2ccc): 未定义对“XSetClipMask”的引用
qpaintengine_x11.cpp:(.text+0x2d26): 未定义对“XCreateGC”的引用
qpaintengine_x11.cpp:(.text+0x2d51): 对“XSetBackground”的未定义引用
qpaintengine_x11.cpp:(.text+0x2d6c): 对“XSetForeground”的未定义引用
qpaintengine_x11.cpp:(.text+0x2da3): 未定义对“XFillRectangle”的引用
qpaintengine_x11.cpp:(.text+0x2db6): 未定义对“XFreeGC”的引用
qpaintengine_x11.cpp:(.text+0x2ddd): 未定义对“XSetClipMask”的引用
qpaintengine_x11.cpp:(.text+0x2e0a): 未定义对“XSetClipOrigin”的引用
qpaintengine_x11.cpp:(.text+0x2e81): 对“XSetForeground”的未定义引用
qpaintengine_x11.cpp:(.text+0x2ebc): 未定义对“XFillRectangle”的引用
qpaintengine_x11.cpp:(.text+0x2f07): 未定义对“XSetClipRectangles”的引用
qpaintengine_x11.cpp:(.text+0x2fa3): 未定义对“XCopyArea”的引用

我不知道出了什么问题。我的配置选项是:

ved@ubuntu:~/qt-src/qt-everywhere-opensource-src-4.6.3$ ./configure -prefix /qt-test -release -shared -fast -pch -no-qt3support -qt-sql-sqlite - no-libtiff -no-libmng -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -no-openssl -nomake 示例 -nomake 演示 -nomake 工具 -optimized-qmake -no-phonon -no-nis -no -opengl -no-cups -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-xkb -no-sm -no-xinerama -no-xshape -no-separate-debug-info -depths 16 - no-qvfb -qt-gfx-linuxfb -no-gfx-qvfb -no-kbd-qvfb -no-mouse-qvfb-qt-kbd-usb -confirm-license -verbose

我复制了与 mini2440 版本相同的选项(-xplatform qws/linux-arm-g++&除外-embedded arm)。

4

1 回答 1

0

如果您使用的是桌面 linux 发行版,请按照x11 要求页面上的说明进行操作。除了 libx11-dev & libXext-dev 你还需要:

  • libfontconfig1-dev
  • libfreetype6-dev
  • libxcursor-dev
  • libxfixes-开发
  • libxft-dev
  • libxi开发
  • libxrandr-dev
  • libxrender-dev
于 2013-09-04T06:34:20.740 回答