C1xx:由于文件路径中的空格而导致致命错误C1083(同时为MS VS构建Qt 4.8)

时间:2016-10-08 09:23:01

标签: visual-studio qt visual-studio-2015

我试图在{-3}}之后通过trig-ger为MS Visual Studio 2015构建Qt 4.8.6。在阶段#5(配置)我有多个错误c1xx : fatal error C1083: Cannot open source file", related to spaces in file path D:\ Program Files(x86)\ Microsoft Visual Studio 14.0`:

Files
c1xx: fatal error C1083: Cannot open source file: Files: No such file or directory
Microsoft
c1xx: fatal error C1083: Cannot open source file: (x86)\Microsoft: No such file or directory
Visual
c1xx: fatal error C1083: Cannot open source file: Visual: No such file or directory
Studio
c1xx: fatal error C1083: Cannot open source file: Studio: No such file or directory
include
c1xx: fatal error C1083: Cannot open source file: 14.0\VC\include: No such file or directory
Files
c1xx: fatal error C1083: Cannot open source file: Files: No such file or directory
Microsoft
c1xx: fatal error C1083: Cannot open source file: (x86)\Microsoft: No such file or directory
Visual
c1xx: fatal error C1083: Cannot open source file: Visual: No such file or directory
Studio
c1xx: fatal error C1083: Cannot open source file: Studio: No such file or directory
QtCore
c1xx: fatal error C1083: Cannot open source file: 14.0\VC\include\QtCore: No such file or directory
Files
c1xx: fatal error C1083: Cannot open source file: Files: No such file or directory
Microsoft
c1xx: fatal error C1083: Cannot open source file: (x86)\Microsoft: No such file or directory
Visual
c1xx: fatal error C1083: Cannot open source file: Visual: No such file or directory
Studio
c1xx: fatal error C1083: Cannot open source file: Studio: No such file or directory
global
c1xx: fatal error C1083: Cannot open source file: 14.0\VC\src\corelib\global: No such file or directory
Files
c1xx: fatal error C1083: Cannot open source file: Files: No such file or directory
Microsoft
c1xx: fatal error C1083: Cannot open source file: (x86)\Microsoft: No such file or directory
Visual
c1xx: fatal error C1083: Cannot open source file: Visual: No such file or directory
Studio
c1xx: fatal error C1083: Cannot open source file: Studio: No such file or directory
xml
c1xx: fatal error C1083: Cannot open source file: 14.0\VC\src\corelib\xml: No such file or directory

这是我的配置命令:

D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>D:\Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6\configure -make nmake -platform win32-msvc2015 -prefix D:\Soft\Qt\4.8\msvc2015 -opensource -confirm-license -opengl desktop -nomake examples -nomake tests

您有什么想法可以解决这个问题吗?我不知道这是典型的Qt问题,文件路径中的空格(由配置引起)或与Visual Studio相关的错误(由c1xx引起)。

UPD 即可。我将命令行根目录更改为D:>并再次运行configure。它最后开始工作(header created for [...])但最终在Creating qmake...之后产生了另一个错误。起初我有多行,如:

cl : Command line warning D9024 : unrecognized source file type 'SOURCE_PATH', object file assumed
cl : Command line warning D9027 : source file 'SOURCE_PATH' ignored
cl : Command line warning D9024 : unrecognized source file type '=', object file assumed
cl : Command line warning D9027 : source file '=' ignored
cl : Command line warning D9024 : unrecognized source file type 'D:\Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6\src\corelib\xml', object file assumed
cl : Command line warning D9027 : source file 'D:\Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6\src\corelib\xml' ignored

最后:

SOURCE_PATH
c1xx: fatal error C1083: Cannot open source file: SOURCE_PATH: No such file or directory
=
c1xx: fatal error C1083: Cannot open source file: =: No such file or directory
include
c1xx: fatal error C1083: Cannot open source file: D:\Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6\include: No such file or directory
SOURCE_PATH
c1xx: fatal error C1083: Cannot open source file: SOURCE_PATH: No such file or directory
=
c1xx: fatal error C1083: Cannot open source file: =: No such file or directory
QtCore
c1xx: fatal error C1083: Cannot open source file: D:\Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6\include\QtCore: No such file or directory
SOURCE_PATH
c1xx: fatal error C1083: Cannot open source file: SOURCE_PATH: No such file or directory
=
c1xx: fatal error C1083: Cannot open source file: =: No such file or directory
global
c1xx: fatal error C1083: Cannot open source file: D:\Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6\src\corelib\global: No such file or directory
SOURCE_PATH
c1xx: fatal error C1083: Cannot open source file: SOURCE_PATH: No such file or directory
=
c1xx: fatal error C1083: Cannot open source file: =: No such file or directory
xml
c1xx: fatal error C1083: Cannot open source file: D:\Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6\src\corelib\xml: No such file or directory

2 个答案:

答案 0 :(得分:0)

我通过切换命令行根目录解决了这个问题。而不是

D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>D:\Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6\configure [options]

D:>Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6\configure [options]

应该只是

D:\Soft\Qt\4.8\msvc2015\qt-everywhere-opensource-src-4.8.6>configure [options]

答案 1 :(得分:0)

对我来说,它是将env var CL设置为exe的路径。这不是一个好主意。