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?????
-
@ibin94
Hi
https://doc.qt.io/qt-5/qsctpsocket.htmlCheck you have QT += network
in pro fileand
#include <QSctpSocket>in the file wher error is.
-
TARGET = SctpServer
CONFIG += console
CONFIG -= app_bundleTEMPLATE = app
SOURCES += main.cpp
sctpserver.cppThe 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 -
@ibin94
Hi
https://doc.qt.io/qt-5/qsctpsocket.htmlCheck you have QT += network
in pro fileand
#include <QSctpSocket>in the file wher error is.
-
Hi and welcome to devnet,
You have a typo, it's QTcpSocket
-
My bad, it's a new class I missed.
As for you original error, aren't you missing the include in your implementation file ?
-
My bad, it's a new class I missed.
As for you original error, aren't you missing the include in your implementation file ?
-
@SGaist
i included it but i think is the issue of enabling the SCTP because i think is disable by defaultPlease 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). -
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.