1

Qt簡単なプログラムを実行するために、次のことを行いました。

  • helloフォルダを作成しました
  • hello.cpp以下のようにプログラムを作成しました。
   #include <QApplication>
    #include <QLabel>

    int main(int argc, char* argv[])
    {
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello...");
    label->show();
    return app.exec();
    }
  • ランqmake -project
  • ランqmake hello.pro--->ここで私は得るMakefile
  • 「make」を実行すると、次のようなものが表示され、停止しない限り続行しているように見えます。

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] : ディレクトリに入る/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]: ディレクトリに入る/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\hello o.pro -o Makefile.hello.hello.hello.hello.hello make -f Makefile.hello.hello.hello.hello.hello make[ 5]: ディレクトリに入る/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] 割り込み make[5 ]: * [sub-hello-pro-make_default] 割り込み make[4]: * [sub-hello-pro-make_default] 割り込み make[3]: * [sub-hello-pro-make_default] 割り込み make[2]: * [sub-hello-pro-make_default] 割り込み make[1]: * [sub-hello-pro-make_default] 割り込み make: * [sub-hello-pro-make_default] 割り込み

プログラムを実行するにはどうすればよいですか?

ありがとう。

4

1 に答える 1

3

Qt インストール パッケージでインストールされた Qt コマンド プロンプトを使用します。次に、 を使用する代わりに、 をmake使用しますmingw32-make

わたしにはできる。

于 2012-12-04T23:05:27.607 に答える