cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl compiles w/ MinGW but doesn't work

From: Damien Pierce <emaildmp_at_yahoo.com>
Date: Sun, 12 Mar 2006 21:06:45 -0800 (PST)

I recompiled everything again w/ -DCURL_STATICLIB on a
different computer and this time it worked. I don't
know why it works now and not previously. I can't
think of anything I did differently.

???!

> I am using MinGW on WinXP.
>
> I can compile libcurl fine, and I can compile
> simple.c
> and link to libcurldll.a or libcurl.dll, but when
> the
> program runs it just crashes. If I link to libcurl.a
> I
> get the common error "undefined reference to
> `_imp__curl_easy_init'". I don't really understand
> static vs. dynamic linking, but I deleted *.o and
> recompiled everything with -DCURL_STATICLIB thinking
> that would help. But everything is the same in that
> case.
>
> I compiled curl.exe fine and it runs fine. I don't
> understand why simple.c linked to libcurl crashes.
> Any
> ideas? Thanks.
>
> /*************** simple.c ************/
> /****** this compiles but crashes *********/
> #include <stdio.h>
> #include <curl/curl.h>
>
> int main(void)
> {
> CURL *curl;
> CURLcode res;
> curl = curl_easy_init();
> return 0;
> }
>
>
Received on 2006-03-13