4

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, ...?)

Community
  • 1
  • 1
KTC
  • 8,967
  • 5
  • 33
  • 38
  • This might be obvious, but did you try searching the projects for those version strings? They could be hard-coded in either curl or the libraries. There is probably some configuration you have to do (i.e. run a script file) to get the real version strings in there. – Luke May 30 '10 at 12:41
  • Yeah I tried searching. Found the macro that defined I can't remember SSL or zlib. It was defined correctly in its own headers that curl was including from SSL / zlib. I seems to have tried all the macros that has SSL and or zlib in its name. No joy. :( I don't even know where curl is getting the wrong version number from. Those numbers doesn't seems to appear anywhere in its source. – KTC May 30 '10 at 18:19

2 Answers2

2

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
  • 11,211
  • 2
  • 27
  • 38
  • Except for the fact that it's now refusing to build with zlib... this is good, thanks. :) – KTC May 31 '10 at 03:37
1

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
  • 451
  • 4
  • 15
  • Works for me, but how you got sftp supported without including `SSH2_PATH` is someone magic to me. – GuySoft Aug 19 '13 at 14:27