我做了以下运行简单Qt
程序:运行一个简单的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
- 冉“使”,在这里,我得到这样的事情,并且似乎还在继续诉讼,除非我停下来:
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]:进入目录/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 - Makefile.hello.hello.hello.hello.hello.hello.hello make -f Makefile.hello.h ello.hello.hello.hello.hello.hello 化妆[6]:* [子你好-PRO-make_default]中断 使[5]:* [子你好-PRO-make_default]中断 化妆[ 4]:* [sub-hello-pro-make_default]中断 make [3]:* [sub-hello-pro-make_default]中断 make [2]:* [sub-hello-pro-make_default]中断 化妆[1]:* [子你好,亲make_default]中断 化妆:* [子你好,亲make_default]中断
我该如何运行程序?
谢谢。
请问,你能显示你的.pro文件吗? –
@ Luca Carlon。它没有生成!我不知道为什么?! – Simplicity
哪个windows版本? –