简体   繁体   中英

Qt + VS2019 16.7.0: moc: Too many input files specified

After updating msvc to the 16.7.0 version my project build is break. I see the following error:

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.

I found the similar question here for VS2010 with the answer that there are should be no spaces in the paths. But I dont have spaces in the paths.

Do anybody know why the abowe issue happens and how to fix it?

It seems, that 2.6.0.6 version of VS Qt Addin is broken . Fixed this issue by disabling automatic extension updates in Visual Studio options and reverting to the 2.5.1 version

It seems, that 2.6.0.6 version of VS Qt Addin is broken. Fixed this issue by disabling automatic extension updates in Visual Studio options and reverting to the 2.5.1 version

Correct, but it is fixed in Version 2.6.0.7 .

At least for me the problem was solved with this update.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM