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

QNetworPrivate classes no exported in Windows

XMLWordPrintable

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

      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. 

        1. QScTcp.zip
          13 kB
          Michail Montesantos
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes