尝试使用VS-addin for Qt在visual studio中编译我的简单Qt应用程序,我收到以下错误:
1>------ Rebuild All started: Project: XXXXXXXXXXXXX, Configuration: Release Win32 ------
1>Build started 5/05/2012 6:57:33 PM.
1>_PrepareForClean:
1> Deleting file "release\XXXXXXXXXXXXX.lastbuildstate".
1>InitializeBuildStatus:
1> Touching "release\XXXXXXXXXXXXX.unsuccessfulbuild".
1>CustomBuild:
1> MOC XXXXXXXXXXXXXMainWidget.h
1> moc: Too many input files specified
1> Usage: moc [options] <header-file>
1> -o<file> write output to file rather than stdout
1> -I<dir> add dir to the include path for header files
1> -E preprocess only; do not generate meta object code
1> -D<macro>[=<def>] define macro, with optional definition
1> -U<macro> undefine macro
1> -i do not generate an #include statement
1> -p<path> path prefix for included file
1> -f[<file>] force #include, optional file name
1> -nn do not display notes
1> -nw do not display warnings
1> @<file> read additional options from file
1> -v display version of moc
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 1.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.05
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
这笔交易是什么?我用Google搜索了,问题似乎是1.1.7中的一个错误。解决方案是重新调整VS项目中的包含。也就是说,我宁愿留在1.1.10 - 它只有一个月的时间,我相信这个问题在其他地方。
答案 0 :(得分:6)
如果文件名或路径中有空格,则会发生这种情况。
某些形式的引用可能会有解决方法,但最理解(IMO)的方法是简单地避免在项目路径和文件名中使用空格。