QT4 unter CodeBlocks
Verfasst: 11. März 2007 22:34
Hallo zusammen! bin hier neu im Forum, und benötige dringend hilfe!!
Ich binn absoluter Anfänger in QT und hoffe ich geh mit meiner fragerei niemandem auf die Nerven und bitte um verständniss wenn ich die Antworten nicht gleich verstehe!!
Ich habe Probleme mit QT unter CodeBlocks!!
Ich habe MinGW-5.1.3, CodeBlocks und die neuste QT-Version installiert.
Ich habe alles verlinkt, also unter
folgendes steht:
bekomme ich folgend fehlermeldung:
hatt vieleicht jemand eine Ahnung an wass es liegen könnte?
Ich binn absoluter Anfänger in QT und hoffe ich geh mit meiner fragerei niemandem auf die Nerven und bitte um verständniss wenn ich die Antworten nicht gleich verstehe!!
Ich habe Probleme mit QT unter CodeBlocks!!
Ich habe MinGW-5.1.3, CodeBlocks und die neuste QT-Version installiert.
Ich habe alles verlinkt, also unter
Dann unterCompiler Settings->Directories->Compiler->C:\Programme\MinGW\include
Compiler Settings->Directories->Compiler->C:\Programme\Qt\4.2.3\include
Wenn ich jetzt ein neues QT-Application erstelle und in der main.cppCompiler Settings->Directories->Linker->C:\Programme\MinGW\lib
Compiler Settings->Directories->Linker->C:\Programme\Qt\4.2.3\lib
folgendes steht:
Code: Alles auswählen
#include <qstring.h>
#include <qapplication.h>
#include <qpushbutton.h>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QPushButton quit("Hello World!");
quit.resize(300, 40);
quit.setFont(QFont("Arial", 18, QFont::Bold));
QObject::connect(&quit, SIGNAL(clicked()), &app, SLOT(quit()));
quit.show();
return app.exec();
}
Code: Alles auswählen
Project : QT Application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Administrator\My Documents\CodeBlocks\QTTest\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
main.cpp:1:21: qstring.h: No such file or directory
main.cpp:2:26: qapplication.h: No such file or directory
main.cpp:3:25: qpushbutton.h: No such file or directory
main.cpp: In function `int main(int, char**)':
main.cpp:7: error: `QApplication' was not declared in this scope
main.cpp:7: error: expected `;' before "app"
main.cpp:8: error: `QPushButton' was not declared in this scope
main.cpp:8: error: expected `;' before "quit"
main.cpp:10: error: `quit' was not declared in this scope
main.cpp:11: error: `QFont' has not been declared
main.cpp:11: error: `Bold' was not declared in this scope
main.cpp:11: error: `QFont' was not declared in this scope
main.cpp:12: error: `QObject' has not been declared
main.cpp:12: error: `clicked' was not declared in this scope
main.cpp:12: error: `SIGNAL' was not declared in this scope
main.cpp:12: error: `app' was not declared in this scope
main.cpp:12: error: `SLOT' was not declared in this scope
main.cpp:12: error: `connect' was not declared in this scope
Process terminated with status 1 (0 minutes, 0 seconds)