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

_WIN32 is not defined for header files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.7.0
    • Build tools: qmake
    • None
    • Windows 7 64 bit
      Qt 5.7 from website (online installer) with mingw53_32

      When compiling a project for windows (32 bit mingw) there seems to be a strange issue with the _WIN32 define in header files: in .cpp files the define exists and works, in .h files it is set and valid according to Qt Creator, but when the application is built and runs any statements in a .h file within the block #ifdef _WIN32 will not exist in the executable.

      Either it is a bug, or (strange) expected behaviour that _WIN32 is defined for .cpp files and not .h files or Qt creator has a bug whereby it isn't differentiating .h and .cpp macros/defines

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

            buddenha Oswald Buddenhagen
            thedjnk Mr nK
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes