Bug with moc parsing of Include directories

  • Trying to build my project after adding QWinWidget, I'm getting a nastygram out of moc which I suspect may be a result of directory names in the include path that contain spaces:

    10>moc qwinwidget.h
    10> moc: Too many input files specified: 'D:\Users\amonra\Documents\GitHub\DSS\DeepSkyStacker\qwinwidget.h' 'Files' '(x86)\Visual' 'Leak' 'Detector\include'

    My VS2017 C++ Additional Include directories is set to:

    .\GeneratedFiles$(ConfigurationName);.\GeneratedFiles;"C:\Program Files (x86)\Visual Leak Detector\include";.;../Libraw;..\ZClass;..\tools;..\LibTIFF;..\CFitsIO;..\Zlib;%(AdditionalIncludeDirectories)

    and the moc settings in VS project properties are set like this:


    It worked OK when I changed the Additional Include directories to read:


    So that does rather confirm the problem. Sadly though that is not a good fix, because the 8.3 short name for the directory isn't portable to the systems other members of the project team.

    I suppose I could create a symlink for it but I'm not happy with that either.

    PS Yes, I do know VLD is less useful with Qt than it could be because of all the global objects Qt creates but ...

    Any chance of a fix for 5.12.8 release?

    Thanks, David

  • I managed to work around the problem.

    The original string for that directory was quoted in the Addtional Include directories.

    I found that just inserting C:\Program Files (x86)\Visual Leak Detector\include into the setting for that without using quotes worked OK - that is:

    .\GeneratedFiles$(ConfigurationName);.\GeneratedFiles;C:\Program Files (x86)\Visual Leak Detector\include;.;../Libraw;..\ZClass;..\tools;..\LibTIFF;..\CFitsIO;..\Zlib;%(AdditionalIncludeDirectories)

    I still think that there's some sort of bug there (either in moc or in QT VS Tools).


  • Lifetime Qt Champion


    You might want to check the bug report system to see if there's something related there.

Log in to reply