Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65850

qmake generated Makefile with precompiled header compiles as c instead of c++ on MSVC

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.10.0
    • Build tools: qmake
    • None
    • Windows 10, MSVC 2015 Community and Qt 5.10 (official binary release).

    Description

      When using qmake to generate a Makefile for a project with precompiled headers, it adds the "-TC" option to the pch generation step. If I use qmake to generate a vcproj instead, it generates the file correctly. 

      I ran into this when trying to build my own project (http://github.com/leozide/leocad), but there's also a thread on the Qt forums from another user with the same problem: 

      https://forum.qt.io/topic/86103/qt-5-10-tries-to-compile-my-precompiled-headers-as-c-instead-of-c-obviously-fails/7

      The thread has a simple example showing the problem.

       

       

      Attachments

        Issue Links

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

          Activity

            People

              orgads Orgad Shaneh
              leozide Leo Zide
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes