Qt related problem

Christian Menke C.Menke at t-online.de
Tue Mar 13 20:18:38 GMT 2001


Hello!
I'm having a bit of trouble getting applications compiled when I use qt.
I've written a very small program that is meant to do nothing but be
there and close when a button is clicked.
My problem is that g++ cannot find qapplication.h and qpushbutton.h:

cmenke at davion:~/cpp$ g++ -o qt-sample qt-sample.cc
qt-sample.cc:1: qapplication.h: No such file or directory
qt-sample.cc:2: qpushbutton.h: No such file or directory
cmenke at davion:~/cpp$ locate qapplication.h
/usr/lib/qt2/include/qapplication.h

After having bugged a few people on IRC and found out that these includes 
should be in /usr/lib/qt/ rather than /usr/lib/qt2/include, and thus I 
tried pointing g++ to the directory where my qapplication.h and stuff 
reside:

cmenke at davion:~/cpp$ g++ -I/usr/lib/qt2/include/ -o qt-sample qt-sample.cc
/tmp/cclt7tiz.o: In function `main':
/tmp/cclt7tiz.o(.text+0x18): undefined reference to
`QApplication::QApplication(int &, char **)'
/tmp/cclt7tiz.o(.text+0x44): undefined reference to
`QString::QString(char const *)'
/tmp/cclt7tiz.o(.text+0x57): undefined reference to
`QPushButton::QPushButton(QString const &, QWidget *, char const *)'

Well, that time, g++ obviously found the includes, but something....
well... something went wrong again :-)

Downloading KDEvelop 1.3 right now, but I'm pretty sure that won't
work either. I'm starting to be a bit lost :/

Debian 2.2, 2.2.18pre21, KDE 2.0, qt2.2, gcc 2.95.2.
Pentium II 350 Mhz, 128 MB RAM, not overclocked.

I'd be grateful if someone could give me a hint or point me to a
tutorial/old mail/whatever. Search on Google didn't help, archives
didn't help, ...

Thanks in advance,
Christian Menke

P.S.: Please CC me on any reply as I'm not (yet) subscribed to the list.

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list