Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, March 2002
Linking Porblem


Message 1 in thread

Hi everybody
I try to compile a program called pango. In the source tree is an dir 
example where another program is lokated. This program needs the 
qt-static library libqt.a When I try to build that program I get an 
linker error complaining about undefined symbols in libqt.a

/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function 
`qt_init_internal(int *, char **, _XDisplay *, unsigned long, unsigned 
long)':
qapplication_x11.o(.text+0x8718): undefined reference to `glXGetConfig'
qapplication_x11.o(.text+0x878f): undefined reference to `glXGetConfig'
qapplication_x11.o(.text+0x8d2f): undefined reference to 
`XRenderQueryExtension'
qapplication_x11.o(.text+0x8d4a): undefined reference to 
`XRenderFindVisualFormat'


the full error message is attached

does anyone know if its a qt problem and if so how to fix it
I'm useing qt-x11-free-3.0.2 compiled both for static and for shared 
usage so I got libqt.[a|so]

thanx in advance
-- 
 [ signature omitted ] 
make  all-recursive
make[1]: Entering directory `/tmp/pango-0.26'
Making all in pango
make[2]: Entering directory `/tmp/pango-0.26/pango'
Making all in mini-fribidi
make[3]: Entering directory `/tmp/pango-0.26/pango/mini-fribidi'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/pango-0.26/pango/mini-fribidi'
make[3]: Entering directory `/tmp/pango-0.26/pango'
make[3]: Leaving directory `/tmp/pango-0.26/pango'
make[2]: Leaving directory `/tmp/pango-0.26/pango'
Making all in modules
make[2]: Entering directory `/tmp/pango-0.26/modules'
Making all in arabic
make[3]: Entering directory `/tmp/pango-0.26/modules/arabic'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/pango-0.26/modules/arabic'
Making all in basic
make[3]: Entering directory `/tmp/pango-0.26/modules/basic'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/pango-0.26/modules/basic'
Making all in hangul
make[3]: Entering directory `/tmp/pango-0.26/modules/hangul'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/pango-0.26/modules/hangul'
Making all in indic
make[3]: Entering directory `/tmp/pango-0.26/modules/indic'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/pango-0.26/modules/indic'
Making all in tamil
make[3]: Entering directory `/tmp/pango-0.26/modules/tamil'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/pango-0.26/modules/tamil'
Making all in thai
make[3]: Entering directory `/tmp/pango-0.26/modules/thai'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/pango-0.26/modules/thai'
Making all in hebrew
make[3]: Entering directory `/tmp/pango-0.26/modules/hebrew'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/pango-0.26/modules/hebrew'
make[3]: Entering directory `/tmp/pango-0.26/modules'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/tmp/pango-0.26/modules'
make[2]: Leaving directory `/tmp/pango-0.26/modules'
Making all in examples
make[2]: Entering directory `/tmp/pango-0.26/examples'
/bin/sh ../libtool --mode=link c++  -g -O2  -o pango-viewer  viewer-qt.o ../pango/libpangox.la ../pango/libpango.la  -L/usr/local/qt/lib -lqt  moc_viewer-qt.o 
c++ -g -O2 -o pango-viewer viewer-qt.o moc_viewer-qt.o  ../pango/.libs/libpangox.so /tmp/pango-0.26/pango/.libs/libpango.so -L/usr/local/apps/glib/1.3.15/lib -L/usr/X11R6/lib -lX11 ../pango/.libs/libpango.so /usr/local/apps/glib/1.3.15/lib/libgobject-1.3.so /usr/local/apps/glib/1.3.15/lib/libgmodule-1.3.so -ldl /usr/local/apps/glib/1.3.15/lib/libglib-1.3.so -L/usr/local/qt/lib -lqt -Wl,--rpath -Wl,/tmp/pango-0.26/pango/.libs -Wl,--rpath -Wl,/usr/local/apps/glib/1.3.15/lib -Wl,--rpath -Wl,/usr/local/apps/pango/0.26.0/lib -Wl,--rpath -Wl,/usr/local/apps/glib/1.3.15/lib
/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function `qt_init_internal(int *, char **, _XDisplay *, unsigned long, unsigned long)':
qapplication_x11.o(.text+0x8718): undefined reference to `glXGetConfig'
qapplication_x11.o(.text+0x878f): undefined reference to `glXGetConfig'
qapplication_x11.o(.text+0x8d2f): undefined reference to `XRenderQueryExtension'
qapplication_x11.o(.text+0x8d4a): undefined reference to `XRenderFindVisualFormat'
/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function `sm_setProperty(char const *, char const *, int, SmPropValue *)':
qapplication_x11.o(.text+0x11e7c): undefined reference to `SmcSetProperties'
qapplication_x11.o(.text+0x11e95): undefined reference to `SmcDeleteProperties'
/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function `sm_performSaveYourself(QSessionManager *)':
qapplication_x11.o(.text+0x130dd): undefined reference to `SmcRequestSaveYourselfPhase2'
qapplication_x11.o(.text+0x13151): undefined reference to `SmcInteractDone'
qapplication_x11.o(.text+0x13298): undefined reference to `SmcSaveYourselfDone'
/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function `QSmSocketReceiver::socketActivated(int)':
qapplication_x11.o(.text+0x135f3): undefined reference to `SmcGetIceConnection'
qapplication_x11.o(.text+0x135fc): undefined reference to `IceProcessMessages'
/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function `QSessionManager::QSessionManager(QApplication *, QString &)':
qapplication_x11.o(.text+0x13926): undefined reference to `SmcOpenConnection'
qapplication_x11.o(.text+0x13a18): undefined reference to `SmcGetIceConnection'
qapplication_x11.o(.text+0x13a1e): undefined reference to `IceConnectionNumber'
/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function `QSessionManager::~QSessionManager(void)':
qapplication_x11.o(.text+0x13c54): undefined reference to `SmcCloseConnection'
/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function `QSessionManager::allowsInteraction(void)':
qapplication_x11.o(.text+0x13d5b): undefined reference to `SmcInteractRequest'
/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function `QSessionManager::allowsErrorInteraction(void)':
qapplication_x11.o(.text+0x13de6): undefined reference to `SmcInteractRequest'
/usr/local/qt/lib/libqt.a(qapplication_x11.o): In function `QSessionManager::release(void)':
qapplication_x11.o(.text+0x13e53): undefined reference to `SmcInteractDone'
/usr/local/qt/lib/libqt.a(qdesktopwidget_x11.o): In function `QDesktopWidgetPrivate::QDesktopWidgetPrivate(void)':
qdesktopwidget_x11.o(.text+0x3d): undefined reference to `XineramaQueryExtension'
qdesktopwidget_x11.o(.text+0x52): undefined reference to `XineramaIsActive'
qdesktopwidget_x11.o(.text+0x72): undefined reference to `XineramaQueryScreens'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontStruct::~QFontStruct(void)':
qfont_x11.o(.text+0x5c): undefined reference to `XftFreeTypeClose'
qfont_x11.o(.text+0x76): undefined reference to `XftPatternDestroy'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::boundingRect(QChar const &)':
qfont_x11.o(.text+0x90c): undefined reference to `XftGlyphCheck'
qfont_x11.o(.text+0x924): undefined reference to `XftGlyphLoad'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::textWidth(QString const &, int, int)':
qfont_x11.o(.text+0xd18): undefined reference to `XftGlyphCheck'
qfont_x11.o(.text+0xd30): undefined reference to `XftGlyphLoad'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::textWidth(QString const &, int, int, QFontPrivate::TextRun *)':
qfont_x11.o(.text+0x121e): undefined reference to `XftGlyphCheck'
qfont_x11.o(.text+0x1236): undefined reference to `XftGlyphLoad'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::textExtents(QString const &, int, int, QCharStruct *)':
qfont_x11.o(.text+0x1e5e): undefined reference to `XftGlyphCheck'
qfont_x11.o(.text+0x1e76): undefined reference to `XftGlyphLoad'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::drawText(_XDisplay *, int, unsigned long, unsigned long, _XGC *, QColor const &, Qt::BGMode, QColor const &, int, int, QFontPrivate::TextRun const *, int)':
qfont_x11.o(.text+0x2574): undefined reference to `XRenderChangePicture'
qfont_x11.o(.text+0x2618): undefined reference to `XRenderFillRectangle'
qfont_x11.o(.text+0x2661): undefined reference to `XRenderCompositeString16'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::inFont(QChar const &)':
qfont_x11.o(.text+0x2948): undefined reference to `XftFreeTypeGlyphExists'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `checkXftFont(_XftPattern *, QString const &, QChar const &)':
qfont_x11.o(.text+0x2b6c): undefined reference to `XftPatternGetString'
qfont_x11.o(.text+0x2c19): undefined reference to `XftPatternDestroy'
qfont_x11.o(.text+0x2c44): undefined reference to `XftFreeTypeOpen'
qfont_x11.o(.text+0x2c63): undefined reference to `XftFreeTypeGlyphExists'
qfont_x11.o(.text+0x2c76): undefined reference to `XftPatternDestroy'
qfont_x11.o(.text+0x2c8f): undefined reference to `XftFreeTypeClose'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::bestXftPattern(QString const &, QString const &) const':
qfont_x11.o(.text+0x3702): undefined reference to `XftPatternBuild'
qfont_x11.o(.text+0x382d): undefined reference to `XftPatternBuild'
qfont_x11.o(.text+0x3876): undefined reference to `XftPatternBuild'
qfont_x11.o(.text+0x38b0): undefined reference to `XftPatternAddBool'
qfont_x11.o(.text+0x38cd): undefined reference to `XftFontMatch'
qfont_x11.o(.text+0x38d9): undefined reference to `XftPatternDestroy'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::initFontInfo(QFont::Script)':
qfont_x11.o(.text+0x6e1b): undefined reference to `XftPatternGetString'
qfont_x11.o(.text+0x6e2c): undefined reference to `XftPatternGetInteger'
qfont_x11.o(.text+0x6e40): undefined reference to `XftPatternGetInteger'
qfont_x11.o(.text+0x6e51): undefined reference to `XftPatternGetInteger'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::loadUnicode(QFont::Script, QChar const &)':
qfont_x11.o(.text+0x7ae8): undefined reference to `XftFreeTypeGlyphExists'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontPrivate::load(QFont::Script, bool)':
qfont_x11.o(.text+0x7fb5): undefined reference to `XftNameUnparse'
qfont_x11.o(.text+0x84d9): undefined reference to `XftNameParse'
qfont_x11.o(.text+0x84fe): undefined reference to `XftFontMatch'
qfont_x11.o(.text+0x851c): undefined reference to `XftFreeTypeOpen'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFont::initialize(void)':
qfont_x11.o(.text+0x90ee): undefined reference to `XftInit'
qfont_x11.o(.text+0x90fe): undefined reference to `XftInitFtLibrary'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontMetrics::width(QChar) const':
qfont_x11.o(.text+0xa697): undefined reference to `XftGlyphCheck'
qfont_x11.o(.text+0xa6af): undefined reference to `XftGlyphLoad'
/usr/local/qt/lib/libqt.a(qfont_x11.o): In function `QFontMetrics::charWidth(QString const &, int) const':
qfont_x11.o(.text+0xaa1b): undefined reference to `XftGlyphCheck'
qfont_x11.o(.text+0xaa33): undefined reference to `XftGlyphLoad'
/usr/local/qt/lib/libqt.a(qpixmap_x11.o): In function `QPixmap::init(int, int, int, bool, QPixmap::Optimization)':
qpixmap_x11.o(.text+0x4c9): undefined reference to `XRenderFindVisualFormat'
qpixmap_x11.o(.text+0x4f7): undefined reference to `XRenderFindFormat'
qpixmap_x11.o(.text+0x527): undefined reference to `XRenderCreatePicture'
/usr/local/qt/lib/libqt.a(qpixmap_x11.o): In function `QPixmap::deref(void)':
qpixmap_x11.o(.text+0x61a): undefined reference to `XRenderFreePicture'
/usr/local/qt/lib/libqt.a(qpixmap_x11.o): In function `QPixmap::QPixmap(int, int, unsigned char const *, bool)':
qpixmap_x11.o(.text+0x7b7): undefined reference to `XRenderFindFormat'
qpixmap_x11.o(.text+0x7e7): undefined reference to `XRenderCreatePicture'
/usr/local/qt/lib/libqt.a(qpixmap_x11.o): In function `QPixmap::convertFromImage(QImage const &, int)':
qpixmap_x11.o(.text+0x1d5b): undefined reference to `XRenderFreePicture'
qpixmap_x11.o(.text+0x1fd7): undefined reference to `XRenderFindFormat'
qpixmap_x11.o(.text+0x2007): undefined reference to `XRenderCreatePicture'
qpixmap_x11.o(.text+0x37b7): undefined reference to `XRenderFreePicture'
qpixmap_x11.o(.text+0x38ec): undefined reference to `XRenderFindVisualFormat'
qpixmap_x11.o(.text+0x3919): undefined reference to `XRenderFindFormat'
qpixmap_x11.o(.text+0x3947): undefined reference to `XRenderCreatePicture'
qpixmap_x11.o(.text+0x3b9f): undefined reference to `XRenderFindFormat'
qpixmap_x11.o(.text+0x3bd7): undefined reference to `XRenderCreatePicture'
/usr/local/qt/lib/libqt.a(qpixmap_x11.o): In function `QPixmap::xForm(QWMatrix const &) const':
qpixmap_x11.o(.text+0x4add): undefined reference to `XRenderFindFormat'
qpixmap_x11.o(.text+0x4b0f): undefined reference to `XRenderCreatePicture'
/usr/local/qt/lib/libqt.a(qpixmap_x11.o): In function `qt_x11_blit_alpha_pixmap(QPixmap *, int, int, QPixmap const *, int, int, int, int)':
qpixmap_x11.o(.text+0x524f): undefined reference to `XRenderFindFormat'
qpixmap_x11.o(.text+0x527e): undefined reference to `XRenderCreatePicture'
/usr/local/qt/lib/libqt.a(qpaintdevice_x11.o): In function `bitBlt(QPaintDevice *, int, int, QPaintDevice const *, int, int, int, int, Qt::RasterOp, bool)':
qpaintdevice_x11.o(.text+0xa43): undefined reference to `XRenderChangePicture'
qpaintdevice_x11.o(.text+0xaa7): undefined reference to `XRenderComposite'
qpaintdevice_x11.o(.text+0xae4): undefined reference to `XRenderChangePicture'
/usr/local/qt/lib/libqt.a(qpainter_x11.o): In function `QPainter::updatePen(void)':
qpainter_x11.o(.text+0xefd): undefined reference to `XRenderSetPictureClipRegion'
qpainter_x11.o(.text+0xf54): undefined reference to `XRenderSetPictureClipRegion'
qpainter_x11.o(.text+0xfb0): undefined reference to `XRenderChangePicture'
/usr/local/qt/lib/libqt.a(qpainter_x11.o): In function `QPainter::updateBrush(void)':
qpainter_x11.o(.text+0x13de): undefined reference to `XRenderSetPictureClipRegion'
qpainter_x11.o(.text+0x143c): undefined reference to `XRenderSetPictureClipRegion'
qpainter_x11.o(.text+0x1496): undefined reference to `XRenderChangePicture'
/usr/local/qt/lib/libqt.a(qpainter_x11.o): In function `QPainter::begin(QPaintDevice const *, bool)':
qpainter_x11.o(.text+0x1cd2): undefined reference to `XRenderChangePicture'
/usr/local/qt/lib/libqt.a(qpainter_x11.o): In function `QPainter::end(void)':
qpainter_x11.o(.text+0x20fb): undefined reference to `XRenderChangePicture'
/usr/local/qt/lib/libqt.a(qpainter_x11.o): In function `QPainter::setClipping(bool)':
qpainter_x11.o(.text+0x253b): undefined reference to `XRenderSetPictureClipRegion'
qpainter_x11.o(.text+0x25db): undefined reference to `XRenderSetPictureClipRegion'
qpainter_x11.o(.text+0x2637): undefined reference to `XRenderChangePicture'
/usr/local/qt/lib/libqt.a(qpainter_x11.o): In function `QPainter::drawPixmap(int, int, QPixmap const &, int, int, int, int)':
qpainter_x11.o(.text+0x5ece): undefined reference to `XRenderComposite'
/usr/local/qt/lib/libqt.a(qpainter_x11.o): In function `QPainter::drawTiledPixmap(int, int, int, int, QPixmap const &, int, int)':
qpainter_x11.o(.text+0x69df): undefined reference to `XRenderComposite'
/usr/local/qt/lib/libqt.a(qwidget_x11.o): In function `QWidget::create(unsigned long, bool, bool)':
qwidget_x11.o(.text+0x70c): undefined reference to `XRenderFreePicture'
qwidget_x11.o(.text+0x746): undefined reference to `XRenderFindVisualFormat'
qwidget_x11.o(.text+0x768): undefined reference to `XRenderCreatePicture'
/usr/local/qt/lib/libqt.a(qwidget_x11.o): In function `QWidget::destroy(bool, bool)':
qwidget_x11.o(.text+0x1237): undefined reference to `XRenderFreePicture'
/usr/local/qt/lib/libqt.a(qwidget_x11.o): In function `QWidget::setMask(QRegion const &)':
qwidget_x11.o(.text+0x5007): undefined reference to `XShapeCombineRegion'
/usr/local/qt/lib/libqt.a(qwidget_x11.o): In function `QWidget::setMask(QBitmap const &)':
qwidget_x11.o(.text+0x50ae): undefined reference to `XShapeCombineMask'
/usr/local/qt/lib/libqt.a(qwidget_x11.o): In function `QWidget::clearMask(void)':
qwidget_x11.o(.text+0x512d): undefined reference to `XShapeCombineMask'
/usr/local/qt/lib/libqt.a(qfontdatabase.o): In function `QFontDatabase::createDatabase(void)':
qfontdatabase.o(.text+0x3c9): undefined reference to `XftListFonts'
qfontdatabase.o(.text+0x40c): undefined reference to `XftPatternGetString'
qfontdatabase.o(.text+0x870): undefined reference to `XftListFonts'
qfontdatabase.o(.text+0x8be): undefined reference to `XftPatternGetString'
qfontdatabase.o(.text+0xc54): undefined reference to `XftListFonts'
qfontdatabase.o(.text+0xc96): undefined reference to `XftListFonts'
qfontdatabase.o(.text+0xcdd): undefined reference to `XftPatternGetString'
qfontdatabase.o(.text+0x1083): undefined reference to `XftPatternGetInteger'
qfontdatabase.o(.text+0x10a0): undefined reference to `XftPatternGetInteger'
qfontdatabase.o(.text+0x10c0): undefined reference to `XftPatternGetInteger'
qfontdatabase.o(.text+0x11e8): undefined reference to `XftFontSetDestroy'
qfontdatabase.o(.text+0x120e): undefined reference to `XftFontSetDestroy'
qfontdatabase.o(.text+0x1234): undefined reference to `XftFontSetDestroy'
collect2: ld returned 1 exit status
make[2]: *** [pango-viewer] Error 1
make[2]: Leaving directory `/tmp/pango-0.26/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/pango-0.26'
make: *** [all-recursive-am] Error 2

Message 2 in thread

On Tue, 5 Mar 2002, Christian Quast wrote:

> Hi everybody
> I try to compile a program called pango. In the source tree is an dir 
> example where another program is lokated. This program needs the 
> qt-static library libqt.a When I try to build that program I get an 
> linker error complaining about undefined symbols in libqt.a
> 
> /usr/local/qt/lib/libqt.a(qapplication_x11.o): In function 
> `qt_init_internal(int *, char **, _XDisplay *, unsigned long, unsigned 
> long)':
> qapplication_x11.o(.text+0x8718): undefined reference to `glXGetConfig'
> qapplication_x11.o(.text+0x878f): undefined reference to `glXGetConfig'
> qapplication_x11.o(.text+0x8d2f): undefined reference to 
> `XRenderQueryExtension'
> qapplication_x11.o(.text+0x8d4a): undefined reference to 
> `XRenderFindVisualFormat'
> 
> the full error message is attached
> 
> does anyone know if its a qt problem and if so how to fix it
> I'm useing qt-x11-free-3.0.2 compiled both for static and for shared 
> usage so I got libqt.[a|so]

Try either linking with the shared version. If you can't do that you'll
need to link with the static version but also include the X11 and GL
libraries in the link stage e.g. -L/usr/X11R6/lib -lX11 -lXext -lGL.

Nick