[SOLVED] (Beginner) Help for Installation of Qt 4.8.1
(I post here since my problem is more about installation.)
I've got problems for the installation on Windows 7, 32bits.
I ve downloaded the latest setup (1.7 Gb) and install the QtSDK. Now, I must set the right Path
in User variables :
@PATH : C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\bin;C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin@
@QTDIR : C:\QtSDK\Desktop\Qt\4.8.1@
@QMAKESPEC : win32-g++@ (don't know whether it's used)
like I've seen: http://sector.ynet.sk/qt4-tutorial/preparations.html
But apparently, I'm doing it wrong. When I build:
@The program has unexpectedly finished.
C:\test\test2\debug\test2.exe exited with code -1073741511@
Thanks for your help!
I'm not 100% sure, but it might be that the SDK sets the paths for you automatically.
Anyway, the program RUNS and crashes, which would indicate that everything is OK with paths. Could you provide the source of your app? It's likely that the problem lies there.
Last question: are you using msvc compiler or mingw? You seem to be setting both in path, which might be dangerous.
Thanks for your help!
It's only an Hello world test:
@ #include <QApplication>
int main(int argc, char *argv)
QApplication app(argc, argv);
QPushButton hello("Hello world!"); hello.resize(100, 30); hello.show(); return app.exec();
I don't know which compiler is used. I'm using Qt Creator and the Run function to test it for the moment. Which one should I keep?
If you don't know, then probably mingw is the way to go. MSVC is valid only when you are using Microsoft tools to compile and run your stuff. Clean msvc from path and see what happens (msvc and mingw libraries are NOT compatible, but will not rise errors during compilation, so it might be the cause of your problem).
Code looks OK. Just to be sure, add this to .pro>
QT += core gui
You can try the following steps.
- Goto you project folder, then delete the .pro.user file
- Open QtCreator and then Goto File->Open.
- Browse to your Project folder and then select the .pro file.
- Then it will ask for Target Setup like "this":http://imageshack.us/f/819/captureotz.png/
- Select the above option and rebuild again.
Try if this works!
Thanks Sierdzio and Soumitra, it's solved!
Except that I put mingw and not msvc in the Target Setup (and deleted the compile msvc in the path)
Everything is working now, thanks a lot!
You are welcome!!!
Nice. Happy coding in Qt :)