problems with QT
Hello. I'm attempting to learn QT and am having some problems that hopefully someone can get me pointed in the right direction, as my google searches have not found the answer.
I'm running SuSE 9.0 and used the cds to install QT
I then created a directory and typed out a basic helloworld program froma tutorial
#include <qapplication.h>
#include <qlabel.h>
int main(int argc, char *argv[]){
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!", 0);
app.setMainWidget(label);
label->show();
return app.exec();
}
I then did qmake -project
no errors
I then ran qmake -no errors
and then I ran make and got the following erros:
g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -DQT_NO_DEBUG -I/usr/lib/qt3/mkspecs/default -I. -I. -I/usr/include -I/include -o hello.o hello.cpp
hello.cpp:1:26: qapplication.h: No such file or directory
hello.cpp:2:20: qlabel.h: No such file or directory
hello.cpp: In function `int main(int, char**)':
hello.cpp:5: error: `QApplication' undeclared (first use this function)
hello.cpp:5: error: (Each undeclared identifier is reported only once for each function it appears in.)
hello.cpp:5: error: parse error before `(' token
hello.cpp:6: error: `QLabel' undeclared (first use this function)
hello.cpp:6: error: `label' undeclared (first use this function)
hello.cpp:6: error: parse error before `(' token
hello.cpp:7: error: `app' undeclared (first use this function)
hello.cpp:4: warning: unused parameter `int argc'
hello.cpp:4: warning: unused parameter `char**argv'
make: *** [hello.o] Error 1
Do I need a full path for my includes? if so where the heck do those things live? TIA!
|