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

Q_DECL_EXPORT and Q_DECL_IMPORT undefined when exporting C code from a Qt DLL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.0.0
    • 4.8.0
    • Core: Other
    • None
    • MSVS 2010

    Description

      When exporting C code within a DLL, Q_DECL_EXPORT is undefined as qglobal.h nests this within a __cplusplus conditional. But it is valid to use __declspec(dllexport) within the "extern 'C' {}" declaration. See the following references:

      MSVS: http://msdn.microsoft.com/en-us/library/aa278942(v=vs.60).aspx)
      GCC: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18479

      Propose Q_DECL_EXPORT and Q_DECL_IMPORT definitions be moved outside the __cplusplus conditional.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            ajdiff Adam Diffenderfer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes