Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-1251

(MsBuild) moc file compilation no longer includes project references (issue #35)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 3.3.0
    • None

      Describe the bug

      During the program compile step (not the MOC compiler) I have recently run into an issue where all of my moc_****.cpp files fail to compile due to unresolvable include paths. I have narrowed this down to the fact that when compiling those files they do not have the paths from referenced projects added to the include paths

      To Reproduce

      1. Create a VS solution with 2 projects
        • A QT Project that builds a moc file (QTProj)
        • Another CPP project that has a file to include (RefProj)
      2. In the RefProj properties set VC++ Directories / All Header Files are Public = true
      3. Add RefProj as a project reference to the QTProj
      4. Include a header file from the RefProj in some header file that compiles to a moc file in the QTProj
      5. When you build the solution the raw QTProj files will all compile file, but the Moc file that includes the file from RefProj will fail due to not being able to find the include file

      Expected behavior

      The moc files should have access to all of the includes that the project files do during compilation.

      Additional context

      We just noticed this issue today (10/22), so if there was an update pushed within the last couple of days it was likely that update that did it.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ali.demiralp Ali Can Demiralp (Inactive)
            heimrich Karsten Heimrich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes