curl-library
Re: How do I compile and install libcurl with MinGW?
Date: Wed, 2 Apr 2008 21:06:28 -0400
On Wed, Apr 2, 2008 at 7:44 PM, Guenter Knauf <eflash_at_gmx.net> wrote:
> Hi Samus,
> > and the libraries and executable has built fine, with error 127 (which
> you
> > told me is no problem, its just when it builds the first time). Now I
> just a question: on what OS / SP are you? And what MingW version / make
> version?
> (try: gcc -v, and mingw32-make -v)
> > tried to build the examples but this is the error it returns:
>
> > cannot find -lssl
> > collect2: ld returned 1 exit status
> > mingw32-make: *** [10-at-a-time.exe] Error 1
> > rm 10-at-a-time.o
>
> > I think that this is because the libraries are not install and the
> linker
> yup.
> > did not find them (right?). So, what should I do? Sorry but I'm a
> complete
> > newby with this, so I kind of need some baby steps explanations hehe.
> I guess sooner or later you might anyway want SSL, so just download the
> OpenSSL libs;
> here you can find pre-compiled:
> http://www.gknw.net/development/ossl/win32/openssl_mingw32-0.9.8g.zip
>
> if you extract them at same level as where you have put libcurl sources it
> should be found:
> ./curl-7.18.1
> ./openssl-0.9.8g
>
> otherwise set an environment var to point to the full path, f.e.:
> set OPENSSL_PATH=c:/projects/sdks/openssl-0.9.8g
>
> HTH, Guenter.
>
I am on Windows XP Home Edition SP 2, using gcc version 3.4.5 (mingw
special) and mingw32-make version 3.81 for an i386 PC.
OK so I need a little explanation first about libraries. When I compiled the
libcurl library (in the 'lib' directory) I got 4 files. libcurl.res,
libcurl.a, libcurl.dll and libcurldll.a. How does MinGW know that in needs
to link to these libraries? Do I have to install them somewhere? If I write
a program that uses libcurl functions, do I have to do something special so
that it compiles correctly?
Also, I downloaded OpenSSL from the link you gave me and I put it in the
folder where I exctracted curl-7.18.1, then I try to compile the examples
again and it doesn't work, it gave me the same error I posted before.
Thanks.
Received on 2008-04-03