MinGW + QT [Windows] траблы с include-директориями

oleg1331

поставил Qt вместе с MinGW, который тот сам качал с сайта и устанавливал. все по инструкции, все отлично до шага, когда делаю make Debug
переменные окружения и вывод такие:

H:\Programming\C++\QtSample>make Debug
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `H:/Programming/C++/QtSample'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"H:/Qt/4.2.1/
include/QtCore" -I"H:/Qt/4.2.1/include/QtCore" -I"H:/Qt/4.2.1/include/QtGui" -I"
H:/Qt/4.2.1/include/QtGui" -I"H:/Qt/4.2.1/include" -I"." -I"H:/Qt/4.2.1/include/
ActiveQt" -I"debug" -I"." -I"..\..\..\Qt\4.2.1\mkspecs\default" -o debug\main.o
main.cpp
main.cpp:1:26: gapplication.h: No such file or directory
main.cpp:2:20: glabel.h: No such file or directory
main.cpp: In function `int main(int, char**)':
main.cpp:6: error: `QApplication' undeclared (first use this function)
main.cpp:6: error: (Each undeclared identifier is reported only once for each fu
nction it appears in.)
main.cpp:6: error: expected `;' before "app"
main.cpp:7: error: `QLabel' undeclared (first use this function)
main.cpp:7: error: `label' undeclared (first use this function)
main.cpp:7: error: `QLabel' has not been declared
main.cpp:8: error: `app' undeclared (first use this function)
mingw32-make[1]: *** [debug\main.o] Error 1
mingw32-make[1]: Leaving directory `H:/Programming/C++/QtSample'
mingw32-make: *** [Debug] Error 2

H:\Programming\C++\QtSample>set
INCLUDE=H:\Qt\4.2.1\include\;H:\Qt\4.2.1\include\Qt\
LIB=H:\Qt\4.2.1\lib\
Path=H:\Qt\4.2.1\bin\;H:\MinGW\bin\;
QDIR=H:\Qt\4.2.1\
QMAKESPEC=g++
QTDIR=H:\Qt\4.2.1

как настроить MinGW, чтобы он меня видел?

oleg1331

да, код самого исходника:
#include <gapplication.h>
#include <glabel.h>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hallo Qt!", 0);
app.setMainWidget(label);
label->show;
return app.exec;
}

spitfire

А #include <QApplication> будет Пушкин делать? (ну и QLabel, и прочая и прочая)

spitfire

Настоятельно рекомендую ознакомиться

oleg1331

упс, спасибо великодушно
Оставить комментарий
Имя или ник:
Комментарий: