Problem with TQtWidget on Ubuntu 11.10

Hi,
I am trying to use TQtWidgets in my Qt4 application, but am getting linker errors:

Linking CXX executable ../../bin/MM2 ../../libs/liblibMM2.so: undefined reference to `TQtWidget::TQtWidget(QWidget*, QFlags<Qt::WindowType>, bool)' ../../libs/liblibMM2.so: undefined reference to `TQtWidget::Refresh()' ../../libs/liblibMM2.so: undefined reference to `TQtWidget::TQtWidget(QWidget*, char const*, QFlags<Qt::WindowType>, bool)' collect2: ld returned 1 exit status

All other Root objects I am using are working fine. Could you point me to the source of the problem? If you need any more details, please let me know.

I am using root from svn trunk, commands for installing:

./configure --enable-soversion --prefix=/usr/local --with-x11-libdir=/usr/lib/i386-linux-gnu --with-xft-libdir=/usr/lib/i386-linux-gnu --with-xext-libdir=/usr/lib/i386-linux-gnu --enable-qt make -j4 make install

Cheers

Hi,

Your executable must also be link against the library libGQt.so.

Cheers,
Philippe

[quote=“blablubber”]Hi,
I am trying to use TQtWidgets in my Qt4 application, but am getting linker errors:

Linking CXX executable ../../bin/MM2 ../../libs/liblibMM2.so: undefined reference to `TQtWidget::TQtWidget(QWidget*, QFlags<Qt::WindowType>, bool)' ../../libs/liblibMM2.so: undefined reference to `TQtWidget::Refresh()' ../../libs/liblibMM2.so: undefined reference to `TQtWidget::TQtWidget(QWidget*, char const*, QFlags<Qt::WindowType>, bool)' collect2: ld returned 1 exit status

All other Root objects I am using are working fine. Could you point me to the source of the problem? If you need any more details, please let me know.

I am using root from svn trunk, commands for installing:

./configure --enable-soversion --prefix=/usr/local --with-x11-libdir=/usr/lib/i386-linux-gnu --with-xft-libdir=/usr/lib/i386-linux-gnu --with-xext-libdir=/usr/lib/i386-linux-gnu --enable-qt make -j4 make install

Cheers[/quote]

Please, try to find and use (or just study it) the
root.cern.ch/viewvc/trunk/graf2d … iew=markup
root.cern.ch/viewvc/trunk/graf2d … iew=markup
with your Qt project to ensure the correct linkage