Хочу откомпилировать на qt4 (вручную без IDE) например такую прогу
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.execO;
}
Делаю как написано в учебнике. И вроде все libqt4 там поустанавливал. Но оно не находит их. OS Debian 6. Что делать?
z@sp:/l/pr/Qt4/study_book/hello$ qmake -project
z@sp:/l/pr/Qt4/study_book/hello$ qmake hello.pro
z@sp:/l/pr/Qt4/study_book/hello$ make
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -I/usr/include/qt3 -o hello.o hello.cpp
hello.cpp:3:24: error: QApplication: No such file or directory
hello.cpp:4:18: error: QLabel: No such file or directory
hello.cpp: In function ‘int main(int, char**)’:
hello.cpp:7: error: ‘QApplication’ was not declared in this scope
hello.cpp:7: error: expected ‘;’ before ‘app’
hello.cpp:8: error: ‘QLabel’ was not declared in this scope
hello.cpp:8: error: ‘label’ was not declared in this scope
hello.cpp:8: error: expected type-specifier before ‘QLabel’
hello.cpp:8: error: expected ‘;’ before ‘QLabel’
hello.cpp:10: error: ‘app’ was not declared in this scope
hello.cpp: At global scope:
hello.cpp:5: warning: unused parameter ‘argc’
hello.cpp:5: warning: unused parameter ‘argv’
make: *** [hello.o] Error 1