Я пытаюсь построить приложение на основе Qt, используя Qt 4.6.2 в CentOS7. Я искал решение в течение последних двух дней, и ничего не работает. Вот вывод сообщения об ошибке. Как ни странно, я выполнил поиск классов и функций, на которые он жалуется, и не смог найти ни одного из них в источнике Qt. Не уверен, почему это так.
[root@devmachine TransmitProcessedImage]# make
g++ TransmitProcessedImage.o VideoSource.o -o TransmitProcessedImage -L../../../lib -lPvBase -lPvDevice -lPvBuffer -lPvGenICam -lPvStream -lPvTransmitter -lPvVirtualDevice -lPvAppUtils -lPvPersistence -lPvSerial -lPvGUI -lSimpleImagingLib -L../../../lib/genicam/bin/Linux64_x64 -L/usr/local/qt/lib -lQtCore -lQtGui
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QTextureGlyphCache::populate(QFontEngine*, int, unsigned int const*, QFixedPoint const*)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QTextureGlyphCache::fillInPendingGlyphs()'
../../../lib/libPvGUI.so: undefined reference to `QMutex::unlockInternal()'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QStaticTextItem::setFontEngine(QFontEngine*)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QPaintEngineEx::drawPixmapFragments(QRectF const*, QRectF const*, int, QPixmap const&, QFlags<QPainter::PixmapFragmentHint>)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QImageTextureGlyphCache::createTextureData(int, int)'
../../../lib/libPvGUI.so: undefined reference to `QMutex::lockInternal()'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QRadialGradient::focalRadius() const'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QRadialGradient::centerRadius() const'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QWidgetPrivate::hasHeightForWidth() const'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QImageTextureGlyphCache::fillTexture(QTextureGlyphCache::Coord const&, unsigned int, QFixed)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QTextureGlyphCache::textureMapForGlyph(unsigned int, QFixed) const'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QPixmapData::toImage(QRect const&) const'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `qt_painterPathFromVectorPath(QVectorPath const&)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QTextureGlyphCache::subPixelPositionForX(QFixed) const'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QMetaType::registerTypedef(char const*, int)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QStaticTextItem::~QStaticTextItem()'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QImageTextureGlyphCache::glyphMargin() const'
../../../lib/libPvGUI.so: undefined reference to `QListData::detach_grow(int*, int)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QGraphicsSystem::platformExtension()'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QWindowSurface::QWindowSurface(QWidget*, bool)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QGraphicsSystem::createPixmapData(QPixmapData*)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QBezier::toPolygon(double) const'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `vtable for QImageTextureGlyphCache'
../../../lib/libPvGUI.so: undefined reference to `QListData::detach(int)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QImage::constBits() const'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QImageData::convertInPlace(QImage::Format, QFlags<Qt::ImageConversionFlag>)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `qt_isExtendedRadialGradient(QBrush const&)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `typeinfo for QImageTextureGlyphCache'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QPaintEngineEx::drawPixmapFragments(QPainter::PixmapFragment const*, int, QPixmap const&, QFlags<QPainter::PixmapFragmentHint>)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QImageTextureGlyphCache::resizeTextureData(int, int)'
/usr/lib64/libQtOpenGL.so.4: undefined reference to `QPaintEngineEx::drawStaticTextItem(QStaticTextItem*)'
collect2: error: ld returned 1 exit status
make: *** [TransmitProcessedImage] Error 1
Вот вывод, когда я запускаю ldd. Кажется, что все указывает на правильные общие объекты.
[root@devmachine TransmitProcessedImage]# ldd /usr/lib64/libQtOpenGL.so.4
linux-vdso.so.1 => (0x00007fff763ec000)
libQtGui.so.4 => /usr/local/qt/lib/libQtGui.so.4 (0x00007fa44f813000)
libQtCore.so.4 => /usr/local/qt/lib/libQtCore.so.4 (0x00007fa44f39a000)
libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007fa44f166000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fa44eec0000)
libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007fa44ecbb000)
libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007fa44ea24000)
libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007fa44e814000)
libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007fa44e609000)
libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007fa44e3ff000)
libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007fa44e1f9000)
libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007fa44dfed000)
libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007fa44ddea000)
libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007fa44dbae000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007fa44d99b000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fa44d65d000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fa44d355000)
libm.so.6 => /usr/lib64/libm.so.6 (0x00007fa44d052000)
libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007fa44ce3c000)
libc.so.6 => /usr/lib64/libc.so.6 (0x00007fa44ca7b000)
libz.so.1 => /usr/lib64/libz.so.1 (0x00007fa44c864000)
librt.so.1 => /usr/lib64/librt.so.1 (0x00007fa44c65c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa4507d0000)
libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007fa44c431000)
libglapi.so.0 => /usr/lib64/libglapi.so.0 (0x00007fa44c203000)
libselinux.so.1 => /usr/lib64/libselinux.so.1 (0x00007fa44bfde000)
libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007fa44bdda000)
libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007fa44bbd8000)
libxcb-glx.so.0 => /usr/lib64/libxcb-glx.so.0 (0x00007fa44b9bd000)
libxcb-dri2.so.0 => /usr/lib64/libxcb-dri2.so.0 (0x00007fa44b7b7000)
libxcb-dri3.so.0 => /usr/lib64/libxcb-dri3.so.0 (0x00007fa44b5b4000)
libxcb-present.so.0 => /usr/lib64/libxcb-present.so.0 (0x00007fa44b3b1000)
libxcb-randr.so.0 => /usr/lib64/libxcb-randr.so.0 (0x00007fa44b1a0000)
libxcb-xfixes.so.0 => /usr/lib64/libxcb-xfixes.so.0 (0x00007fa44af98000)
libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007fa44ad8a000)
libxcb-shape.so.0 => /usr/lib64/libxcb-shape.so.0 (0x00007fa44ab85000)
libxcb-sync.so.1 => /usr/lib64/libxcb-sync.so.1 (0x00007fa44a97e000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fa44a756000)
libxshmfence.so.1 => /usr/lib64/libxshmfence.so.1 (0x00007fa44a552000)
libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x00007fa44a34c000)
libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007fa44a13f000)
libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007fa449edd000)
liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007fa449cb8000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fa449ab3000)
Задача ещё не решена.
Других решений пока нет …