PDA

View Full Version : QT4 + winhttp



TNT
5th January 2010, 12:44
I believe that i am the only one in the whole universe that wants to link qt with winhttp.lib.
I am looking for some help about this subject and i found nothing.
I am using qt4 creator with mingw32 @ windows 7.
I tried everything and i mean everything...!

LIBS += -L... -l in .pro file, in project settings for building
I tried
inside makefiles(release, debug).
I tried LIBS += mylib.lib and INCLUDEPATHS +=...

But no result. Keep getting winhttp.h file or directory not found.
Please help. I want to use winhttp with qt (QHttp is obsolete).
Is it possible to accomplish this task?

Sorry for my english, it is not my native language.

wysota
5th January 2010, 12:57
Why not use QNetworkAccessManager instead?

As for your direct problem - the LIBS variable has nothing to do with includes. You need to change the INCLUDEPATH (note the lack of "S" at the end) variable.

TNT
5th January 2010, 13:32
i wrote INCLUDEPATHS on my hurry, in project file i have written INCLUDEPATH. I know that includes have nothing to do with libs but @ a forum there was this solution also. nvm

How can i get the body from the http reply using QNetworkAccessManager and QNetworkReply ?
Can you provide a working example?

wysota
5th January 2010, 13:38
How can i get the body from the http reply using QNetworkAccessManager and QNetworkReply ?
QNetworkReply is a QIODevice, just call readAll() on it.

faldzip
5th January 2010, 13:45
I am using qt4 creator with mingw32 @ windows 7.
Just to warn you:
AFAIR you can't link MinGW app with MSVC libraries and this filename:

winhttp.lib
looks like MSVC lib.
But maybe I am wrong...

TNT
5th January 2010, 13:57
Thank you both! ;)