在 Windows 中编译 Qt 时出现致命错误 [英] Fatal error when compiling Qt in Windows

查看:54
本文介绍了在 Windows 中编译 Qt 时出现致命错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在 Windows 7 中使用 MSVS2010 构建 Qt 5.0.1.

I tried to build Qt 5.0.1 with MSVS2010 in Windows 7.

这些是我的步骤:

  1. 将源代码解压到 C:\Qt\5.0.1
  2. 启动 VS2010 命令提示符
  3. 键入 configure(此步骤大约需要 45 分钟)
  4. 输入 nmake

一个小时后,我收到以下错误:

After an hour I get the following error:

"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 并重复了这些步骤,但我再次遇到了同样的错误.

I searched online, and saw many solutions, but none of them solved my problem. I even re-installed Windows and repeated those steps but I got the same error again.

推荐答案

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

You have spaces and parenthesis in your env paths. Try to use short path, you can get them by opening a Windows command prompt with cmd and type dir /X. Short names will be in front of corresponding directories

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

for example, if you have a script to set up your environment :

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 变量并在此处应用短路径.

If you have no script, the faulty path could be set in the default Windows PATH environment variable. Then you'll have to manually edit PATH variable and apply short paths here.

windows 电源

这篇关于在 Windows 中编译 Qt 时出现致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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