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. error: 'QSctpSocket' does not name a type QSctpSocket *t=new QSctpSocket; please how do we solve this error or is it QT 5.8 has this error?????
QtWS25 Last Chance

error: 'QSctpSocket' does not name a type QSctpSocket *t=new QSctpSocket; please how do we solve this error or is it QT 5.8 has this error?????

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.
  • I Offline
    I Offline
    ibin94
    wrote on last edited by
    #1

    bolded text

    mrjjM 1 Reply Last reply
    1
    • I ibin94

      bolded text

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

      @ibin94
      Hi
      https://doc.qt.io/qt-5/qsctpsocket.html

      Check you have QT += network
      in pro file

      and
      #include <QSctpSocket>

      in the file wher error is.

      I 1 Reply Last reply
      0
      • I Offline
        I Offline
        ibin94
        wrote on last edited by
        #3

        TARGET = SctpServer
        CONFIG += console
        CONFIG -= app_bundle

        TEMPLATE = app

        SOURCES += main.cpp
        sctpserver.cpp

        The following define makes your compiler emit warnings if you use

        any feature of Qt which as been marked deprecated (the exact warnings

        depend on your compiler). Please consult the documentation of the

        deprecated API in order to know how to port your code away from it.

        DEFINES += QT_DEPRECATED_WARNINGS

        You can also make your code fail to compile if you use deprecated APIs.

        In order to do so, uncomment the following line.

        You can also select to disable deprecated APIs only up to a certain version of Qt.

        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

        HEADERS +=
        sctpserver.h
        includes.h

        1 Reply Last reply
        0
        • mrjjM mrjj

          @ibin94
          Hi
          https://doc.qt.io/qt-5/qsctpsocket.html

          Check you have QT += network
          in pro file

          and
          #include <QSctpSocket>

          in the file wher error is.

          I Offline
          I Offline
          ibin94
          wrote on last edited by
          #4

          @mrjj
          thanks for your reply

          but in my pro file
          QT += network is already included

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

            Hi and welcome to devnet,

            You have a typo, it's QTcpSocket

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

            I 1 Reply Last reply
            0
            • SGaistS SGaist

              Hi and welcome to devnet,

              You have a typo, it's QTcpSocket

              I Offline
              I Offline
              ibin94
              wrote on last edited by
              #6

              @SGaist
              Qt 5.8.0 supports both QTcpSocket and QSctpSocket

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

                My bad, it's a new class I missed.

                As for you original error, aren't you missing the include in your implementation file ?

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

                I 1 Reply Last reply
                0
                • SGaistS SGaist

                  My bad, it's a new class I missed.

                  As for you original error, aren't you missing the include in your implementation file ?

                  I Offline
                  I Offline
                  ibin94
                  wrote on last edited by
                  #8

                  @SGaist
                  i included it but i think is the issue of enabling the SCTP because i think is disable by default

                  kshegunovK 1 Reply Last reply
                  0
                  • I ibin94

                    @SGaist
                    i included it but i think is the issue of enabling the SCTP because i think is disable by default

                    kshegunovK Offline
                    kshegunovK Offline
                    kshegunov
                    Moderators
                    wrote on last edited by
                    #9

                    Please show the relevant code. It's a compile error, so it's not something directly related to Qt (at least it can't be judged from the error). Have you configured your project to use Qt 5.8? Can you also show the complete project file you're using (the one posted upstairs has no QT += network in it).

                    Read and abide by the Qt Code of Conduct

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

                      You aren't working on Windows, are you ?

                      Because, in the detailed description there's a note stating that it's a feature not supported on Windows platform.

                      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

                      • Login

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