Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Help with Qt compilation
Massimiliano last edited by A Former User
well i recently installed QT ind wanted tu test it also i'm a student and i need it to do some projects
but when i have do the classic Hello World program it didn't compile before posting it i was searching a solution everywere on google
also i didn't find anything
this is my compilation error
also this is my .pro file
my header file
and my mainwindow.ui
also i just said that i can't find a solution anywhere only one guy and he show that the way is patching a read-only file but i don't know how to
patch things i mean i installed QT only for institutional reason (Also for passion too)
i hope you that are you reading this thread can help me and
thanks you in advance
also i don't know if i'm posting it in the wrong section but i need it working very urgently
Eeli K last edited by
First: how did you install you Qt library? If you have installed the prerequisites, installed the Qt library with the official Qt installer, installed the proper binaries of Qt with the installer, configured the Qt Creator properly to use the compiler you want to use (either mingw or microsoft's; the latter you have to install manually outside the Qt installer), etc., and created the project with Qt Creator's wizard, such a simple program should compile and run without problems.
I don't know but suspect that you try to use MS c++ compiler. It can't find crtdefs.h file. Maybe you can find it and add it to INCLUDEPATH. But even if it helps you might run into other problems if the compiler environment isn't set up properly.
A quick fix is to install the mingw compiler, mingw version of Qt and set up Creator to use it and the mingw compiler. Install them with the Maintenance Tool. Then create a new project with the Creator.
Massimiliano last edited by
dude I do not know how to thank you, the fast fix (not that fast at all i have to install 8GB)fixed my problem also i wanted to use gcc compilator but if is not avalable i will use mingw dud you really helped me now i can resume my study
then about the frist question i installed everything using the QT install wizard and i created the project using the QT wizard but i just tested it out (with the librarys and things) nad compiles with no problem in codeblocks and aabout the compiler enviroment i didn't setup anything i just installed QT throught the wizard, my expectation were that it install everithing that he need like codeblock IDE but anyway thanks you really helped me