Problem compiling Qt (probably trivial)

Hi, I’m trying to compile root-based Qt application (example from User’s guide), using root 5.32.03 and qt3.3 (on SLC5). I’m getting error message:

g++ -c -pipe -Wall -W -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I"/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include" -I/usr/lib/qt-3.3/include -o main.o main.cpp
In file included from main.cpp:4:
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:24:27: error: QtGui/QWidget: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:25:31: error: QtGui/QMouseEvent: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:26:30: error: QtGui/QShowEvent: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:27:31: error: QtGui/QFocusEvent: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:28:29: error: QtGui/QKeyEvent: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:29:32: error: QtGui/QResizeEvent: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:30:27: error: QtCore/QEvent: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:31:31: error: QtGui/QPaintEvent: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:32:32: error: QtGui/QPaintDevice: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:33:26: error: QtCore/QSize: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:34:27: error: QtCore/QPoint: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:35:29: error: QtCore/QPointer: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:36:27: error: QtGui/QPixmap: No such file or directory
In file included from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:37,
from main.cpp:4:
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtCanvasPainter.h:15:26: error: QtCore/QObject: No such file or directory
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h: In member function ‘int TQtWidgetBuffer::Height() const’:
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:93: error: ‘class QPaintDevice’ has no member named ‘height’
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h: In member function ‘int TQtWidgetBuffer::Width() const’:
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:94: error: ‘class QPaintDevice’ has no member named ‘width’
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h: At global scope:
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:114: error: ISO C++ forbids declaration of ‘QPointer’ with no type
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:114: error: expected ‘;’ before ‘<’ token
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h: In member function ‘TQtCanvasPainter* TQtWidget::CanvasDecorator()’:
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:311: error: ‘fCanvasDecorator’ was not declared in this scope
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h: In member function ‘void TQtWidget::SetCanvasDecorator(TQtCanvasPainter*)’:
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.03/i686-slc5-gcc43-opt/root/include/TQtWidget.h:312: error: ‘fCanvasDecorator’ was not declared in this scope
make: *** [main.o] Error 1

have I forgotten to add something to PATH? or something like that?

Cheers, Mariusz

Sorry, Qt 3 support was dropped a while ago.
We can extract that version from SVN of course.
However, I am not sure it will work with fresh ROOT version.
Please don’t be confused with some legacy “#ifdef QT3” that still can be found.That’s just old obsolete things those we had no strong reason to clean up yet.

[quote=“fine”]Sorry, Qt 3 support was dropped a while ago.
We can extract that version from SVN of course.
However, I am not sure it will work with fresh ROOT version.
Please don’t be confused with some legacy “#ifdef QT3” that still can be found.That’s just old obsolete things those we had no strong reason to clean up yet.[/quote]

OK, I’ll try with the latest one (4.8.2). BTW The User’s Guide (the latests is for root version 5.26) should be updated as well!
Cheers,
Mariusz

Check root.bnl.gov/QtRoot/How2Install4Unix.html#long also to get the all QtRoot packages