尝试在 Visual Studio 中使用 Qt 的 VS-addin 编译我的简单 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 ==========
这是怎么回事?我用谷歌搜索,问题似乎是 1.1.7 中的错误。解决方案是重新调整 VS 项目中的包含。也就是说,我更愿意继续使用 1.1.10 - 它只有一个月大,我确信问题出在其他地方。