执行生成步骤"Make"时生成项目时出错 [英] Error while building project when executing build step 'Make'

查看:1267
本文介绍了执行生成步骤"Make"时生成项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在PC上安装了Qt SDK 1.2.1.我创建了一个新项目作为测试:

I've just installed Qt SDK 1.2.1 on my PC. I created a new project as a test:

File > New File or Project... > Other Project > Plain C++ Project

我选择了以下构建设置:

I chose these build settings:

Qt Creator生成了此.pro文件:

Qt Creator generated this .pro file:

TEMPLATE = app
CONFIG += console
CONFIG -= qt

SOURCES += main.cpp

和这个main.cpp文件:

and this main.cpp file:

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello World!" << endl;
    return 0;
}

构建失败:

13:39:35: Running build steps for project test...
13:39:35: Starting: "C:\Dev\Qt\QtSDK\QtCreator\bin\jom.exe" clean
Could Not Find C:\Dev\Projects\Qt\test\debug\main.obj
    del debug\main.obj
    del debug\test.intermediate.manifest debug\test.exp debug\test.ilk vc*.pdb vc*.idb
Could Not Find C:\Dev\Projects\Qt\test\debug\test.intermediate.manifest
Could Not Find C:\Dev\Projects\Qt\test\vc*.pdb
Could Not Find C:\Dev\Projects\Qt\test\test.intermediate.manifest
Could Not Find C:\Dev\Projects\Qt\test\test.exp
Could Not Find C:\Dev\Projects\Qt\test\test.ilk
Could Not Find C:\Dev\Projects\Qt\test\vc*.pdb
    c:\dev\qt\qtsdk\desktop\qt\4.8.1\msvc2008\bin\qmake.exe -spec ..\..\..\Qt\QtSDK\Desktop\Qt\4.8.1\msvc2008\mkspecs\win32-msvc2008 CONFIG+=declarative_debug -o Makefile test.pro
    C:\Dev\Qt\QtSDK\QtCreator\bin\jom.exe -f Makefile.Debug clean
    C:\Dev\Qt\QtSDK\QtCreator\bin\jom.exe -f Makefile.Release clean
Could Not Find C:\Dev\Projects\Qt\test\release\main.obj
Could Not Find C:\Dev\Projects\Qt\test\release\test.intermediate.manifest
    del release\main.obj
    del release\test.intermediate.manifest release\test.exp
    del ".\test.intermediate.manifest"
    del test.exp
    del test.ilk
    del vc*.pdb
    del vc*.idb
Could Not Find C:\Dev\Projects\Qt\test\vc*.idb

jom 1.0.8 - empower your cores

13:39:36: The process "C:\Dev\Qt\QtSDK\QtCreator\bin\jom.exe" exited normally.
13:39:36: Configuration unchanged, skipping qmake step.
13:39:36: Starting: "C:\Dev\Qt\QtSDK\QtCreator\bin\jom.exe" 
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -I"..\..\..\Qt\QtSDK\Desktop\Qt\4.8.1\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\DOCUME~1\Mitch!\LOCALS~1\Temp\main.obj.5936.16.jom
    C:\Dev\Qt\QtSDK\QtCreator\bin\jom.exe -f Makefile.Debug
'cl' is not recognized as an internal or external command,
operable program or batch file.
jom: C:\Dev\Projects\Qt\test\Makefile.Debug [debug\main.obj] Error 1

jom 1.0.8 - empower your cores

jom: C:\Dev\Projects\Qt\test\Makefile [debug] Error 2
13:39:36: The process "C:\Dev\Qt\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
Error while building project test (target: Desktop)
When executing build step 'Make'

在启动Qt Creator并检查Projects > Build Settings > Build Environment > Using System Environment > Clear System Environment之前,我曾尝试运行Qt 4.8.1 for Desktop (MSVC 2008)批处理脚本.

I've tried running the Qt 4.8.1 for Desktop (MSVC 2008) batch script before starting Qt Creator and checking the Projects > Build Settings > Build Environment > Using System Environment > Clear System Environment without success.

我的PATH变量:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\jEdit;C:\Program Files\TortoiseSVN\bin;C:\Program Files\doxygen\bin;C:\Program Files\NVIDIA Corporation\Cg\bin;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\WINDOWS\system32\WindowsPowerShell\v1.0

我的计算机正在运行Windows XP Professional(Service Pack 2). Qt SDK 1.2.1附带的Qt Creator版本是2.4.1.

My computer is running Windows XP Professional (Service Pack 2). The version of Qt Creator that ships with Qt SDK 1.2.1 is 2.4.1.

推荐答案

看起来cl要么未安装在您的系统上,要么需要添加到PATH环境变量中.尝试在C:\Program Files\Microsoft Visual Studio [version]\中的某个地方找到cl.exe二进制文件,然后将包含该二进制文件的目录添加到PATH中.

Looks like cl is either not installed on your system, or needs to be added to the PATH environment variable. Try to find the cl.exe binary somewhere in C:\Program Files\Microsoft Visual Studio [version]\ and add the directory that contains that binary to your PATH.

这篇关于执行生成步骤"Make"时生成项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆