Re: Curl, Openssl and Makefile.m32
Date: Sun, 9 Sep 2007 23:41:50 +0200
> I've got some good news and bad news ... The good news is that it
> built and everything so I thought I'd get the latest daily and build
> it ... the method should be the same:
> 1) cmd prompt
> 2) run the bat file defining the roots to both the zlib and openssl
> 3) mingw32
> First thing works :) But the mingw32-make mingw32-ssl didn't so I wen
> to the lib directory and tried mingw32-make -f Makefile.m32 SSL=1
> ZLIB=1. They're essentially the same thing, right? I was also getting
yes, the main makefile only calls the two makefile.m32 in ./lib and ./src with those var definitions.
> an error from urldata.h (line 97), in the makefile so I changed the
> line (previously: #include </zlib.h>), to #include
> <../../zlib-1.2.3/include/zlib.h>, and that fixed that, but I'm
> confused as to why it didn't work this time when it did before ...
something must be wrong with your env var settings; I' suggest you check there again, probably a typo, or you used relative paths; but you should never change anything in the sources - that's certainly wrong approach! Instead the include path the compiler gets is somewhere wrong, and you have to check there...
> Anyway all the .o files are made fine now :) But I got one more error:
>> cannot find -lz
>> collect2: ld returned 1 exit status
>> mingw32-make: *** [libcurl.dll] Error 1
sure, for same reason: if your path to zlib is wrong, then both include files and libs are not found!
> Did I?
unfortunately no. I've just checked the today's snapshot, and that works fine, so no reason to change anything in the files. Probably you didnt use self-compiled zlib? Just to remind:
everything you use should in any case be compiled with same compiler to avoid any later problems at runtime. Here's a mingw32 build of zlib which you can use:
> Anyway I tested it in a program and I'm getting linker errors: "error
> LNK2019: unresolved external symbol __imp__curl_easy_cleanup
> referenced in function _main". To remind ye I'm using MSVC 03 .NET on
> XP SP2. I pointed the compiler to the directories OK (it compiles
> fine, just doesn't build or run).
that confuses me now: all the time bevore you spoke about MingW32, and now you come up with MSVC??
If you use MSVC then you should also compile openssl, zlib, and libcurl with that....
any reason why you use MSVC now for compiling your sample? There are also GUIs out which use MinGW32;
f.e. look here (but I thought you mentioned this before?):
> I'm making this simple https program:
here's your sample compiled with MingW32 + the makefile I used for it:
please try the makefile, maybe that can help you in creating your sample;
also irt might show you how you can create such makefiles; I did just hack it from the ./src/Makefile.m32.
Received on 2007-09-09