Simplicity
Simplicity

Reputation: 48966

Running a simple Qt program

I have done the following to run a simple Qt program:

   #include <QApplication>
    #include <QLabel>

    int main(int argc, char* argv[])
    {
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello...");
    label->show();
    return app.exec();
    }

c:\QtSDK\Desktop\Qt\4.8.1\msvc2008\bin\qmake.exe c:\Users\Ola\Desktop\hello\hell o.pro -o Makefile.hello make -f Makefile.hello make[1]: Entering directory /c/Users/Ola/Desktop/hello' c:\QtSDK\Desktop\Qt\4.8.1\msvc2008\bin\qmake.exe c:\Users\Ola\Desktop\hello\hell o.pro -o Makefile.hello.hello make -f Makefile.hello.hello make[2]: Entering directory/c/Users/Ola/Desktop/hello' c:\QtSDK\Desktop\Qt\4.8.1\msvc2008\bin\qmake.exe c:\Users\Ola\Desktop\hello\hell o.pro -o Makefile.hello.hello.hello make -f Makefile.hello.hello.hello make[3]: Entering directory /c/Users/Ola/Desktop/hello' c:\QtSDK\Desktop\Qt\4.8.1\msvc2008\bin\qmake.exe c:\Users\Ola\Desktop\hello\hell o.pro -o Makefile.hello.hello.hello.hello make -f Makefile.hello.hello.hello.hello make[4]: Entering directory/c/Users/Ola/Desktop/hello' c:\QtSDK\Desktop\Qt\4.8.1\msvc2008\bin\qmake.exe c:\Users\Ola\Desktop\hello\hell o.pro -o Makefile.hello.hello.hello.hello.hello make -f Makefile.hello.hello.hello.hello.hello make[5]: Entering directory /c/Users/Ola/Desktop/hello' c:\QtSDK\Desktop\Qt\4.8.1\msvc2008\bin\qmake.exe c:\Users\Ola\Desktop\hello\hell o.pro -o Makefile.hello.hello.hello.hello.hello.hello make -f Makefile.hello.hello.hello.hello.hello.hello make[6]: Entering directory/c/Users/Ola/Desktop/hello' c:\QtSDK\Desktop\Qt\4.8.1\msvc2008\bin\qmake.exe c:\Users\Ola\Desktop\hello\hell o.pro -o Makefile.hello.hello.hello.hello.hello.hello.hello make -f Makefile.hello.hello.hello.hello.hello.hello.hello make[6]: * [sub-hello-pro-make_default] Interrupt make[5]: * [sub-hello-pro-make_default] Interrupt make[4]: * [sub-hello-pro-make_default] Interrupt make[3]: * [sub-hello-pro-make_default] Interrupt make[2]: * [sub-hello-pro-make_default] Interrupt make[1]: * [sub-hello-pro-make_default] Interrupt make: * [sub-hello-pro-make_default] Interrupt

How can I run the program?

Thanks.

Upvotes: 1

Views: 136

Answers (1)

Fenrir
Fenrir

Reputation: 31

Use the Qt Command Prompt installed with Qt installation package. Then, instead of using make, use mingw32-make.

It works for me.

Upvotes: 3

Related Questions