Answer the question
In order to leave comments, you need to log in
How to connect libcurl to Qt?
Good afternoon!
It was necessary to write an HTTP client, but I have no experience with networks (only a few lectures at the university).
On the Internet, I found a suitable option for myself, using the libcurl library.
Having installed the library, successfully compiled it under Linux, launched it - everything works like clockwork. But for the convenience of work, I would like to continue writing the rest of the code in Qt.
I went to the official website https://curl.haxx.se/download.html. Next, I downloaded the version I needed
.
In my project in .pro I registered the paths:
Answer the question
In order to leave comments, you need to log in
It is necessary to connect libcurldll.a in this form.
Here is a piece taken from a real project.
win32|win64: LIBS += -lws2_32 -lshlwapi -lodbc32 -lpsapi -lcomdlg32 \
-L$$PWD/../../Common/cURL/lib/ -lcurldll -lole32 \
-loleaut32
If you don't have a requirement to work specifically with the MSVC compiler, then you can take Qt along with curl from MSYS2 . I often use this assembly, everything is compatible with each other (it is assembled by one compiler). I didn’t try curl, but about a dozen other libraries work in the project without problems.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question