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

Cannot compile under Windows when Windows headers are included after Qt headers

    XMLWordPrintable

Details

    Description

      If using this sequence of includes:

      #include <QtCore>
      #include <windows.h>

      then I cannot compile the application anymore. This is caused by the following line in qnetworksession.h:

      #undef interface

      This basically removes the "interface" keyword, which is used by Microsoft Visual Studio compilers

      Workaround: #include all windows headers before any Qt headers

      Attachments

        1. main.cpp
          0.5 kB
        2. qtbug14702.zip
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            peter-har Peter Hartmann
            charlys Karlheinz Spaeth
            Maurice Kalinowski Maurice Kalinowski
            Alex Blasche Alex Blasche
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes