Unsolved QSctpSocket does not compile
-
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
-
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. -
Hi
Just as a note.
I tried in my Mint linux with Qt5.9.1
and it seems not active. -
It is unless Qt was built with
SCTP
disabled. The second condition is to allow QDoc to do its magic. -
@SGaist
Well it is a version from online installer.
So i do wonder why it seems compiled without. -
@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 -
Hi
Does your .h file also show the class part in
grey ?also could you test if QT_NO_SCTP is defined ?
-
@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?
-
surprisingly, the OnlineInstaller variant for MSVC2015
is shipped with QT_NO_SCTP defined as well
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 -
@J.Hilk i think we will completly forget about Qt Sctp support and write a wrapper for the C-socket interface.