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

QMake does not define _WINDLL when generating DLL makefiles on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.2, 5.7.1
    • 5.6
    • Build tools: qmake
    • None
    • Qt 5.6, VS2012, Windows 7.
    • b6f5b38f8c883f5c82d9dc0332f55521f59b70db

    Description

      Visual Studio automatically defines _WINDLL when building a DLL, regardless of project settings (https://msdn.microsoft.com/en-us/library/8x480de8.aspx). This define is therefore widely used to detect DLL vs. static library or executable build target on Windows.

      VS project files generated by QMake does correctly define _WINDLL. However, _WINDLL is not defined for QMake generated makefiles for DLL projects on Windows. This causes problems for my organization.

      Steps to reproduce:

      • Navigate to the qtbase\tests\auto\tools\qmake\testdata\simple_dll project.
      • Run "qmake -tp vc" to generate a VS project. Open project and verify that _WINDLL is defined when building.
      • Run "qmake" to generate a makefile. Verify that _WINDLL is NOT defined when building with "jom".

      Attachments

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

        Activity

          People

            forderud Fredrik Orderud
            forderud Fredrik Orderud
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes