将 msvc 更新到 16.7.0 版本后,我的项目构建中断。我看到以下错误:
1> moc: Too many input files specified: 'D:\DevProj\C++\QtLib\src\QtLib\GUI\FramelessWindow.h' 'D:\DevProj\C++\ALib\src' 'D:\DevProj\C++\QtLib\src\' 'D:\libs\leathers\Source'
1> Usage: D:\libs\Qt\Qt.5.14.2\5.14.2\msvc2017_64\bin\moc.exe [options] [header-file] [@option-file]
1> Qt Meta Object Compiler version 67 (Qt 5.14.2)
1> Options:
1> -?, -h, --help Displays help on commandline options.
1> --help-all Displays help including Qt specific options.
1> -v, --version Displays version information.
1> -o <file> Write output to file rather than stdout.
1> -I <dir> Add dir to the include path for header files.
1> -F <framework> Add Mac framework to the include path for header
1> files.
1> -E Preprocess only; do not generate meta object
1> code.
1> -D <macro[=def]> Define macro, with optional definition.
1> -U <macro> Undefine macro.
1> -M <key=value> Add key/value pair to plugin meta data
1> --compiler-flavor <flavor> Set the compiler flavor: either "msvc" or "unix".
1> -i Do not generate an #include statement.
1> -p <path> Path prefix for included file.
1> -f <file> Force #include <file> (overwrite default).
1> -b <file> Prepend #include <file> (preserve default
1> include).
1> --include <file> Parse <file> as an #include before the main
1> source(s).
1> -n <which> Do not display notes (-nn) or warnings (-nw).
1> Compatibility option.
1> --no-notes Do not display notes.
1> --no-warnings Do not display warnings (implies --no-notes).
1> --ignore-option-clashes Ignore all options that conflict with compilers,
1> like -pthread conflicting with moc's -p option.
1> Arguments:
1> [header-file] Header file to read from, otherwise stdin.
1> [@option-file] Read additional options from option-file.
我在这里为 VS2010 找到了类似的问题,答案是路径中不应该有空格。但我在路径中没有空格。
有人知道为什么会出现上述问题以及如何解决吗?