curl-library
Re: How do I compile and install libcurl with MinGW?
Date: Wed, 2 Apr 2008 18:48:33 -0400
On Tue, Apr 1, 2008 at 10:59 PM, Guenter Knauf <eflash_at_gmx.net> wrote:
> Hi Samus,
> > OK. If I run make from the root of the folder, something weird happens.
> > The hard drive just keeps making noise, and it makes some stack dumps
> over
> > and over and doesn't stop. If I run the Makefile at the root of the
> folder
> hmm, you should use a mingw32 target, f.e.
> mingw32-make mingw32
>
> > using bash MSYS, then it runs ./configure, but other weird things also
> that's correct.
> > happen. Windows keeps telling me that programs had a problem and needed
> to
> > close, and at the end it simply displayed error 77.
> that's not correct; will look into that when time permits.
>
> > Now, I didn't use MSYS for the Makefile.m32 inside the 'lib' folder, I
> > only used make from the command prompt. I downloaded the daily snapshot,
> and
> > the ca-bundle.h error did not appeared. The library seems to have
> compiled but
> > I did have error 127 again. It displays:
>
> > del /q /f > NUL 2>&1 libcurl.a
> > make: [libcurl.a] Error 127 (ignored)
> aaahhhh! That's ok, and only happends with first run; once libcurl.a|dll
> exist this error should be gone;
> but I'm asking me if we should just trust that the linker correctly
> overwrites any existing libcurl...
> perhaps we should just remove this delete command to avoid confuding
> people....
>
> > Sorry, but after this I do not now what to do, and I don't know either
> why
> > I can't compile from the makefile in the root folder (if I even need
> it).
> as I said above you should use a mingw32 target;
> open the main makefile in the root and seach for mingw32...; the simplest
> are:
> mingw32-make mingw32
> mingw32-make mingw32-clean
>
> ok, now to your other question:
> look at ./docs/examples; there's another Makefile.m32, try that most of
> the samples should build fine, few might not (perhaps because they use
> features like SSL which you might not have compiled in); let us know here,
> and we try to fix....
>
> Guenter.
>
>
>
Hi again. Thanks a lot for your replies. I compiled using the Makefile.m32
file inside the lib folder using command "mingw32-make -f Makefile.m32" and
the Makefile at the root of the folder, with command "mingw32-make mingw32",
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 tried
to build the examples but this is the error it returns:
gcc -I. -I../.. -I../../include -I../../lib -I"../../openssl-0.9.8g/outinc"
-I".
./../zlib-1.2.3" -g -O2 -Wall -DCURL_STATICLIB -DUSE_SSLEAY
-DHAVE_OPENSSL_ENGIN
E_H -DHAVE_LIBZ -DHAVE_ZLIB_H -c 10-at-a-time.c
gcc -s -o 10-at-a-time.exe 10-at-a-time.o -L../../lib -lcurl
-L../../openssl-0.9
.8g/out -lssl -lcrypto -lgdi32 -L../../zlib-1.2.3 -lz -lwldap32 -lws2_32
-lwinmm
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot
fin
d -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
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. Thanks
a lot!
Received on 2008-04-03