I wrote a small Qt application in Dev-C++ as shown:
#include <QApplication>
#include <QLabel>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}
I am quite sure I've done everything necessary to start creating Qt applications such as install Qt5.3.2, setup the system environment variables, etc. However, when trying to compile the program in Dev-C++, I get an error saying:
[Error]: QApplication: No such file or directory
After closely following instructions from other tutorials, I still cannot get the program to compile.
What could I be doing wrong?
Dev-C++ is based on mingw, so you should install Qt compiled for mingw on Windows. Then indeed you should use qmake to generate Makefiles. For compilation you should use the make utility provided by mingw distribution shipped with Dev-C++ (the name of this utility might not be exactly 'make' in mingw)