Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2010 在Windows中编译Qt时出现致命错误_Visual Studio 2010_Qt_Qt5 - Fatal编程技术网

Visual studio 2010 在Windows中编译Qt时出现致命错误

Visual studio 2010 在Windows中编译Qt时出现致命错误,visual-studio-2010,qt,qt5,Visual Studio 2010,Qt,Qt5,我尝试在Windows7中使用MSVS2010构建Qt5.0.1 以下是我的步骤: 将源代码提取到C:\Qt\5.0.1中 启动VS2010命令提示符 类型配置(此步骤大约花费45分钟) nmake型 一小时后,我发现以下错误: "C:\Program Files (x86)\Microsoft DirectX SDKUtilities\bin\x86\fxc.exe" /nologo /E standardvs /T vs_2_0 /Fh shaders\standardvs.h ..\..\

我尝试在Windows7中使用MSVS2010构建Qt5.0.1

以下是我的步骤:

  • 将源代码提取到C:\Qt\5.0.1中
  • 启动VS2010命令提示符
  • 类型配置(此步骤大约花费45分钟)
  • nmake型
  • 一小时后,我发现以下错误:

    "C:\Program Files (x86)\Microsoft DirectX SDKUtilities\bin\x86\fxc.exe"
    /nologo /E standardvs /T vs_2_0 /Fh shaders\standardvs.h ..\..\..\3rdparty\angle
    \src\libGLESv2\shaders\Blit.vs
    
    'C:\Program' is not recognized as an internal or external command,
    operable program or batch file.
    
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft DirectX SDKUtiliti
    es\bin\x86\fxc.exe' : return code '0x1'
    Stop.
    
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\bin\nmake.exe"' : return code '0x2'
    
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    
    Stop.
    
    我在网上搜索,看到了很多解决方案,但没有一个解决了我的问题。
    我甚至重新安装了Windows并重复了这些步骤,但我又犯了同样的错误。

    您的env路径中有空格和括号。尝试使用短路径,您可以通过使用
    cmd
    打开Windows命令提示符并键入
    dir/X
    来获取它们。短名称将位于相应目录的前面

    例如,如果您有一个脚本来设置您的环境:

    SET VISUALDIR=C:\Program Files\Microsoft Visual Studio 9.0
    SET PATH=%VISUALDIR%\VC\bin;%PATH%
    
    变成

    SET VISUALDIR=C:\PROGRA~1\MICROS~1.0
    SET PATH=%VISUALDIR%\VC\bin;%PATH%
    
    如果没有脚本,则可以在默认的Windows
    path
    环境变量中设置错误路径。然后您必须手动编辑
    PATH
    变量并在此处应用短路径


    windows power

    您需要更改的路径是什么?我在Windows 8中遇到与VS2013完全相同的问题……并将所有环境变量更改为不再包含空格,再次运行配置,但没有帮助:(对我来说,我需要安装Microsoft SDK。缺少实际的编译器。通过运行“cl.exe”我发现它不存在。安装后,编译器命令会自动添加到环境路径中。对于其他任何人来说…对我来说,$LIB和$INCLUDE环境变量中的路径名中存在空格问题。我在cygwin下生成,但同样的问题可能适用于纯Windows环境这个回答帮助我了解了这个问题,因为消息是M$-神秘的。