簡體   English   中英

運行一個簡單的Qt程序

[英]Running a simple Qt program

我已經完成以下操作來運行一個簡單的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
  • Ran qmake hello.pro --->這里我得到Makefile
  • 跑'做',在這里,我得到這樣的東西,除非我阻止它,它似乎繼續進行:

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 \\ hell o.pro -o Makefile.hello.hello.hello.hello.hello make -f Makefile.hello.hello.hello.hello.hello make [5]:Enterin g目錄/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]中斷

我該如何運行該程序?

謝謝。

使用Qt安裝包安裝的Qt命令提示符。 然后,而不是使用make使用mingw32-make

這個對我有用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM