Qt创建者:qmake无法识别

时间:2013-05-31 15:22:19

标签: qt qt-creator qmake

我试图按照this tutorial来理解'qmake'。但是当我来到以下命令时:

qmake -o Makefile hello.pro

我的命令行控制台向我显示以下消息:

'qmake' is not recognized as an internal or external command, operable program or batch file

我知道qmake是Qt创建者的一部分,因此只要我在项目的文件夹中运行它就应该执行它。那么,为什么它不被认可?

3 个答案:

答案 0 :(得分:4)

在安装程序为Qt创建的开始菜单条目中,您应找到一个项目,该项目打开一个命令提示符,其中已设置了所有必需的环境变量(包括PATH)。对于使用MingW的Qt 5.0.2安装,它被称为“Qt 5.0.2 for Desktop(MinGW 4.7)”。

答案 1 :(得分:2)

在Windows上,您可以将路径添加到PATH或从其放置的目录运行qmake,或使用绝对路径。

答案 2 :(得分:0)

Sorry my friend, i don´t speak English very well.

In Qt 5.10.1 I resolved this problem running the command prompt in the next path, C:\Qt\5.10.1\mingw53_32>, after you need change the directory where is the file hello.pro and run the commnand qmake -o Makefile hello.pro after you can see the makefile in the respective folder.