Unknown module(s) in QT: openssl-linked
-
First line in my .pro file:
QT += core gui widgets sql xml network webenginewidgets multimedia httpserver openssl-linked
Qt Creator: 12.0.1
Qt: 6.6.0
OS: macos sonoma 14.0I figured out that
SSL
may be an issue when myhttp://...
network request came through, but myhttps://...
requests did not.Anything I should look at, compile, change...?
Feedback is much appreciated!Roy
-
@TheFlyingMooseMan said in Unknown module(s) in QT: openssl-linked:
openssl-linked
This is not a Qt module so qmake is right in rejecting it.
I think on macOS Qt uses Apple's secure libraries by default so it should "just work". If you want to force using OpenSSL, you need to download / compile OpenSSL and link it to your project (either at runtime using
LD_LIBRARY_PATH
or by rpath). -
@sierdzio How do I make sure that this is working?
I have the following code to send the network request:
QNetworkAccessManager* n=new QNetworkAccessManager(this); connect(n, SIGNAL(finished(QNetworkReply *)), this, SLOT(handleImageDataNetwork(QNetworkReply*))); n->get(QNetworkRequest(QUrl(urlString))); return;
And the following code to process the network reply:
if(r->error()==QNetworkReply::NoError) { if(r->open(QIODeviceBase::ReadOnly)) { qDebug() << SB_DEBUG_INFO << r->bytesAvailable(); QByteArray a=r->readAll(); qDebug() << SB_DEBUG_INFO << a.length(); if(a.length()>0) { qDebug() << SB_DEBUG_INFO; QPixmap image; // Store in cache image.loadFromData(a); _storeInCache(&a); emit imageDataReady(image); } } }
Running will yield the following output:
0x1e19bd300 "08:45:53" ../app/ExternalData.cpp handleImageDataNetwork 367 bytesAvailable: 0 0x1e19bd300 "08:45:53" ../app/ExternalData.cpp handleImageDataNetwork 369 length: 0
Anything I missed?
-
Hi,
Are you in control of the server ?
You can also use Wireshark to analyze the traffic you have. -
Oh well. I am calling
wget
to get things accomplished. Nice work around that also takes care of redirects and all that.