0
votes

I've created a downloader application that downloads files via the http protocol. I used the QNetworkAccessManager/QNetworkReply/QNetworkRequest classes to achieve this.

There are several error codes listed in the QNetworkReply docs--one of them is error code 99 which is an "unknown network-related error."

On my development machine, whenever I initiate a download with the application, it downloads smoothly, and I do not receive any error code 99's.

When I deploy my application and test it on another PC that does not have Qt installed, when I initiate the download, I get error code 99 immediately; however, other functions that use the QNetworkAccessManager class work just fine, even on PCs without Qt in their environment (for example the http POST method).

I've also deployed this application with the same exact code for OS X, and the deployed versions of it do NOT get any error code 99's, and everything functions normally.

Is there any reason why I would be getting unknown network-related error on PC systems that don't have a Qt development environment?

I checked dependency-walker for all the dependencies, etc. I'm kind of at a loss and don't know how to proceed.

1

1 Answers

1
votes

The problem is that the QtNetwork API uses OpenSSL for some operations, apparently. This was not made super clear in the Qt Docs. There is a class for SSL support, and I figured that I'd only need to include the SSL DLLs if I used that class, not QNetworkAccessManager:

http://qt-project.org/doc/qt-5/ssl.html

The reason it worked on my development machine is because the OpenSSL DLLs are on my PATH variable.

Including the OpenSSL DLLs in the application directory fixed the problem.