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

QNetworPrivate classes no exported in Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.2
    • Network
    • None
    • Windows 10 X64, msvc 2019
    • Windows

    Description

      I was trying to compile QSctpSocket and QSctpServer out of tree in Windows but the link fails because the QTcpSocketPrivate and other Private parts are not exported.

      This is not an issue in Linux or any other OS's. The problem occurs because msvc needs to be told what to export but in gcc and relatives they export everything by default.

      To fix, change Q_AUTOTEST_EXPORT to Q_NETWORK_EXPORT in all the exported  _p.h headers, or add it where it's needed like QTcpSocketPrivate and QAbstractSocketPrivate.

       

      The included zip file contains a minimum viable product that will reproduce this issue. 

      Attachments

        Issue Links

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

          Activity

            People

              manordheim Mårten Nordheim
              silajim Michail Montesantos
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes