views:

759

answers:

2

With the help of question #197444, I have managed to build cURL & libcurl from source on Windows from within the Visual Studio 2010 IDE, OpenSSL 1.0.0, and zlib 1.2.5. The problem I see is that at the moment, if I run the resulting curl.exe with the argument -V, then the version that it report is

curl 7.20.1 (i386-pc-win32) libcurl/7.20.1 OpenSSL/0.9.8d zlib/1.2.3
Protocols: dict file ftp ftps http https imap imaps ldap pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS Largefile NTLM SSL libz

Note the versions reported for both OpenSSL & zlib doesn't match if what I actually used. Any idea on how to fix this?

p.s. Is there a clear list of optional components that can be compiled into libcurl and what options/preprocessor directive to use? (e.g. SSPI, libidn, ...?)

+2  A: 

I took a quick peek at the curl source code and it is getting those version numbers dynamically from the DLLs, not from any static sources. So those are the versions of the libraries that are actually loaded into the curl process, not the versions of the libraries that were used to build the curl source. You probably have older versions of those libraries on your system that are getting loaded by the curl process.

Luke
Except for the fact that it's now refusing to build with zlib... this is good, thanks. :)
KTC
A: 

I build cURL and libcurl from command line with this batch file

@echo off

rem assumes OpenSSL at ../../openssl-1.0.0a
rem assumes zlib at ./../zlib-1.2.5 and built with static runtime libraries (/MT)

echo "Add '#define HAVE_LDAP_SSL 1' to lib\config-win32.h"
notepad lib\config-win32.h
pause

cd lib
nmake -f Makefile.vc9 clean
nmake -f Makefile.vc9 OPENSSL_PATH=../../openssl-1.0.0a ZLIB_PATH=../../zlib-1.2.5    RTLIBCFG=static CFG=release-ssl-zlib

cd ..
cd src
nmake -f Makefile.vc9 clean
nmake -f Makefile.vc9 OPENSSL_PATH=../../openssl-1.0.0a ZLIB_PATH=../../zlib-1.2.5 RTLIBCFG=static CFG=release-ssl-zlib

And this is what I get as version

curl 7.21.0 (i386-pc-win32) libcurl/7.21.0 OpenSSL/1.0.0a zlib/1.2.5
Protocols: dict file ftp ftps http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS Largefile NTLM SSL libz
josuegomes