Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSctpSocket does not compile

QSctpSocket does not compile

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hape
    wrote on last edited by hape
    #1

    Hi,
    i'm trying to play around with QSctpSocket, Linux (Ubuntu 18.04), Qt 5.9.5
    QtCreator won't compile, g++ says:

    ../sctptest/main.cpp:8:5: error: unknown type name 'QSctpSocket'; did you mean 'QTcpSocket'?
    

    (i really meant QSctpSocket)

    .pro contains:

    QT -= gui
    QT += network
    
    CONFIG += c++11 console
    CONFIG -= app_bundle
    

    what am i missing?

    thanks, HaPe

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Might be a silly question, but are you sure you are using Qt 5.9.5 to build your application ? QSctpSocket has been added in Qt 5.8.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        Just as a note.
        I tried in my Mint linux with Qt5.9.1
        and it seems not active.

        alt text

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          It is unless Qt was built with SCTP disabled. The second condition is to allow QDoc to do its magic.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          mrjjM H 2 Replies Last reply
          0
          • SGaistS SGaist

            It is unless Qt was built with SCTP disabled. The second condition is to allow QDoc to do its magic.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @SGaist
            Well it is a version from online installer.
            So i do wonder why it seems compiled without.

            1 Reply Last reply
            0
            • SGaistS SGaist

              It is unless Qt was built with SCTP disabled. The second condition is to allow QDoc to do its magic.

              H Offline
              H Offline
              hape
              wrote on last edited by
              #6

              @SGaist and others
              This is standard Ubuntu Qt package (open source version); i do have /usr/include/x86_64-linux-gnu/qt5/QtNetwork/qsctpsocket.h which starts with "#if !defined(QT_NO_SCTP) || defined(Q_CLANG_QDOC)"
              So how can i check if QSctp is supported? And what is Q_CLANG_QDOC?
              Do i need to install additional packages? Linux Sctp module is enabled (which shouldn't make a difference when compiling).
              HP

              mrjjM 1 Reply Last reply
              0
              • H hape

                @SGaist and others
                This is standard Ubuntu Qt package (open source version); i do have /usr/include/x86_64-linux-gnu/qt5/QtNetwork/qsctpsocket.h which starts with "#if !defined(QT_NO_SCTP) || defined(Q_CLANG_QDOC)"
                So how can i check if QSctp is supported? And what is Q_CLANG_QDOC?
                Do i need to install additional packages? Linux Sctp module is enabled (which shouldn't make a difference when compiling).
                HP

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Hi
                Does your .h file also show the class part in
                grey ?

                also could you test if QT_NO_SCTP is defined ?

                H 1 Reply Last reply
                0
                • mrjjM mrjj

                  Hi
                  Does your .h file also show the class part in
                  grey ?

                  also could you test if QT_NO_SCTP is defined ?

                  H Offline
                  H Offline
                  hape
                  wrote on last edited by
                  #8

                  @mrjj indeed, class QSctpSocket is greyed out in QtCreator and QT_NO_SCTP is defined. So probably Ubuntus Qt package is not compiled with SCTP support?

                  1 Reply Last reply
                  1
                  • J.HilkJ Online
                    J.HilkJ Online
                    J.Hilk
                    Moderators
                    wrote on last edited by J.Hilk
                    #9

                    surprisingly, the OnlineInstaller variant for MSVC2015

                    is shipped with QT_NO_SCTP defined as well
                    0_1530087882949_6b0df274-23cb-4abd-8555-45c80a14836f-image.png

                    On MacOS QT_NO_SCTP is not defined

                    Both 5.11 from the online installer.

                    @hape
                    seems like you'll have to compile the Qt libs yourself to enable the feature for your OS-distribution


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    H 1 Reply Last reply
                    1
                    • J.HilkJ J.Hilk

                      surprisingly, the OnlineInstaller variant for MSVC2015

                      is shipped with QT_NO_SCTP defined as well
                      0_1530087882949_6b0df274-23cb-4abd-8555-45c80a14836f-image.png

                      On MacOS QT_NO_SCTP is not defined

                      Both 5.11 from the online installer.

                      @hape
                      seems like you'll have to compile the Qt libs yourself to enable the feature for your OS-distribution

                      H Offline
                      H Offline
                      hape
                      wrote on last edited by
                      #10

                      @J.Hilk i think we will completly forget about Qt Sctp support and write a wrapper for the C-socket interface.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved