mingw make无法处理路径中的空格? [英] mingw make can't handle spaces in path?

查看:466
本文介绍了mingw make无法处理路径中的空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译使用qmake创建的makefile代码. 当我运行mingw32-make时,出现以下错误:

I am trying to compile code, the makefile created using qmake. When I run mingw32-make I get the following error:

cd bzip2-1.0.5\ && c:\QtSDK\Desktop\Qt\4.7.3\mingw\bin\qmake.exe c:\Documents an
d Settings\user\My Documents\Visual Studio 2010\Projects\meshlab\meshlab\meshla
b\src\external\bzip2-1.0.5\bzip2-1.0.5.pro -o Makefile
Cannot find file: c:\Documents.
Cannot find file: and.
Cannot find file: Settings\user\My.
Cannot find file: Documents\Visual.
Cannot find file: Studio.
Cannot find file: 2010\Projects\meshlab\meshlab\meshlab\src\external\bzip2-1.0.5
\bzip2-1.0.5.pro.
mingw32-make: *** [bzip2-1.0.5\Makefile] Error 2

由于错误,似乎mingw32-make无法理解其中包含空格的路径.真的吗?有办法解决吗?

By the error it appears that mingw32-make doesn't understand paths that have spaces in them. Is that true? Is there a way around it?

推荐答案

来自 MinGW入门"指南:

MinGW的路径可能包含空格,如果没有,通常与MinGW一起使用的其他程序会遇到此类路径的问题.因此,我们强烈建议您不要在路径名称引用中带有空格的任何位置安装MinGW.也就是说,您应避免将其安装到程序文件"或我的文档"等任何子目录中.

MinGW may have problems with paths containing spaces, and if not, usually other programs used with MinGW will experience problems with such paths. Thus, we strongly recommend that you do not install MinGW in any location with spaces in the path name reference; i.e. you should avoid installing into any subdirectory of "Program Files" or "My Documents", or the like.

我怀疑在运行可执行文件中发现的相同问题也会与其他文件一起显现.您可以尝试将整个文件(文件规范)用双引号引起来,这可以起作用,但是Windows在该区域有时不如基于UNIX的外壳合理.

I suspect the same problems found in running executable files will also manifest itself with other files as well. You could try wrapping the whole thing (file specification) inside double quotes and this may work but Windows is sometimes not as logical as UNIX-based shells in this area.

文件名中的空格无论如何都是邪恶的:-)

Spaces in file names are evil anyway :-)

这篇关于mingw make无法处理路径中的空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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