Fatal error when compiling Qt in Windows

旧城冷巷雨未停 提交于 2019-12-18 08:57:23

问题


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

These are my steps:

  1. Extract source code into C:\Qt\5.0.1
  2. Start VS2010 command prompt
  3. Type configure (this step took approximately 45 minute)
  4. Type 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.

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.


回答1:


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%

becomes

SET VISUALDIR=C:\PROGRA~1\MICROS~1.0
SET PATH=%VISUALDIR%\VC\bin;%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 power



来源:https://stackoverflow.com/questions/14861718/fatal-error-when-compiling-qt-in-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!