Important: Please read the Qt Code of Conduct -

[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

    I've tried:
    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:

    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!

  • Moderators

    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>
    #include <QPushButton>

    int main(int argc, char *argv[])
    QApplication app(argc, argv);

     QPushButton hello("Hello world!");
     hello.resize(100, 30);
     return app.exec(&#41;;

    @SOURCES +=

    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?

  • Moderators

    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

  • Hi,
    You can try the following steps.

    1. Goto you project folder, then delete the .pro.user file
    2. Open QtCreator and then Goto File->Open.
    3. Browse to your Project folder and then select the .pro file.
    4. Then it will ask for Target Setup like "this":
    5. 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!!!

  • Moderators

    Nice. Happy coding in Qt :)

Log in to reply