#1132 error when build curl-7.27.0 with openssl

closed-fixed
5
2013-06-21
2012-08-01
skyxie
No

when build curl-7.27.0 with openssl usinge MSVC commandline
need to change curl-7.27.0\lib\Makefile.vc9 ( .vc6, .vc8, .vc10 also) as following to fix the bug

CFLAGSSSL = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
==>
CFLAGSSSL = /DUSE_SSLEAY /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"

below is my error log.
C:\pycurl_build\curl-7.27.0>nmake vc-ssl-zlib VC=vc9 OPENSSL_PATH=../../openssl-1.0.1c ZLIB_PATH=../../zlib-1.2.7
...
cl.exe /O2 /DNDEBUG /MD /DUSE_SSLEAY /I "../../openssl-1.0.1c/inc32" /I
"../../openssl-1.0.1c/inc32/openssl" /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I ".
./../zlib-1.2.7" /DCURL_STATICLIB /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD
/c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 /Fo"release-ssl-zlib\ ssluse.obj" .\ssluse.c
ssluse.c
.\ssluse.c(2796) : error C2065: 'MD5_CTX' : undeclared identifier
.\ssluse.c(2796) : error C2146: syntax error : missing ';' before identifier 'MD
5pw'
.\ssluse.c(2796) : error C2065: 'MD5pw' : undeclared identifier
.\ssluse.c(2798) : warning C4013: 'MD5_Init' undefined; assuming extern returnin
g int

the reason is in ssluse.c USE_OPENSSL should be defined.
#ifdef USE_SSLEAY
#ifdef USE_OPENSSL //// at here, USE_OPENSSL should be defined.
#include <openssl/rand.h>
#include <openssl/x509v3.h>
#include <openssl/dsa.h>
#include <openssl/dh.h>
#include <openssl/err.h>
#include <openssl/md5.h>
#else
#include <rand.h>
#include <x509v3.h>
#endif

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2012-08-07
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks