Hello!
I wanted to use curl lib in my program but I have problem with this lib in qt creator.
In .pro file i have something like that:
INCLUDEPATH += "D:/Qt/curl-7.21.6-devel-mingw32/include"
win32:LIBS += -L"D:/Qtcurl-7.21.7-ssl-sspi-zlib-static-bin-w32" -lcurl
INCLUDEPATH += "D:/Qt/curl-7.21.6-devel-mingw32/include"
win32:LIBS += -L"D:/Qtcurl-7.21.7-ssl-sspi-zlib-static-bin-w32" -lcurl
To copy to clipboard, switch view to plain text mode
And in header file I am including curl/curl.h. QT Creator see the functions for curl, but when I want to build, I get:
release/downloader.o:downloader.cpp:(.text+0x1b1): undefined reference to `_imp__curl_easy_init'
release/downloader.o:downloader.cpp:(.text+0x1cd): undefined reference to `_imp__curl_easy_setopt'
collect2: ld returned 1 exit status
release/downloader.o:downloader.cpp:(.text+0x1b1): undefined reference to `_imp__curl_easy_init'
release/downloader.o:downloader.cpp:(.text+0x1cd): undefined reference to `_imp__curl_easy_setopt'
collect2: ld returned 1 exit status
To copy to clipboard, switch view to plain text mode
I found couple informations how to install curl in windows and use in qt creator but i always get that error. I tried to link .dll files and .a files, effect is the same. Of course I have declared appropriate:
CURL *curl;
curl = curl_easy_init();
etc
CURL *curl;
curl = curl_easy_init();
etc
To copy to clipboard, switch view to plain text mode
I tried even install curl by mingw32-make, but even if i had installed libssl and zlib, I get errors about missing zlib, ssl and something else.
I want to use curl, becouse in qnetworkaccessmeneger when i post into a site, then i get a message then i'm not using a cookie, even I setup them.
I would be grateful if you could help me.
Sory for my bad English
Janusz
Bookmarks