cURL / Mailing Lists / curl-library / Single Mail


Re: libcurl with Codeblocks

From: as df <>
Date: Sat, 7 May 2016 15:04:59 +0200

Thank you very much this is working now.

2016-05-06 21:39 GMT+02:00 Ray Satiro via curl-library <>:

> On 5/6/2016 2:23 PM, as df wrote:
>> curl = curl_easy_init();
>> isn't an error anymore but now I get this error:
>> C:\...\curl-7.48.0-win64-mingw\lib\libcurl.a(easy.o)|| undefined
>> reference to `__imp_WSAStartup'|
>> In the lib folder there are 2 files: libcurl.a and libcurldll.a
>> I use Win10 64 bit and tried this code:
>> SOLVED: I had to link the libraries in the right order. First
>> libcurldll.a , second libcurl.a
>> However I still get an error: Program can not be started because
>> libcurl.dll is missing. I have this file but don't know what to do with it.
>> Could it be the case that I have to set a PATH variable in system
>> properties? Would be glad if someone could explain this to me, guess you
>> can mess up a lot there.
> You only need one, libcurldll. curl-7.48.0-win32-mingw comes with both the
> DLL import library (libcurldll.a) and the static library (libcurl.a).
> Though it has a static library it is missing the other static library
> dependencies so it won't be possible to use the static library unless you
> have those dependencies. Remove libcurl.a from your libs. What you may need
> to do is specify the lib directory and then the lib curldll. Basically it
> looks something like this when I build it
> gcc -o simple simple.c -I curl-7.48.0-win32-mingw\include -L
> curl-7.48.0-win32-mingw\lib -lcurldll
> And yes you need to have the DLL in your path or the same directory as
> your program. Some IDEs have a project section where you can use a modified
> path for running your program.
> -------------------------------------------------------------------
> List admin:
> Etiquette:

List admin:
Received on 2016-05-07