How Build OpenSSL on Windows for 32 bit with Visual Studio 2010 (SP1) ==================================================================== This is primarily intended for building P4COM $Id: //depot/projects/openssl/1.0.1j/README-P4COM.txt#1 $ Create a workspace like this: ============================== Root: C:\Data\work\openssl Options: allwrite noclobber nocompress unlocked nomodtime rmdir SubmitOptions: leaveunchanged LineEnd: local View: //depot/projects/openssl/... //robert_openssl/... Steps: ====== - you need Perl for Win32. Unless you will build on Cygwin, you will need ActiveState Perl, available from http://www.activestate.com/ActivePerl. [From internet articles, it appears that other Perl versions don't work!] - Make files writable (otherwise configure may fail) > attrib -r * - Run the following > perl Configure VC-WIN32 no-asm --prefix=c:/some/openssl/dir > ms\do_ms Then from the VC++ environment at a prompt do: > nmake -f ms\ntdll.mak If all is well it should compile and you will have some DLLs and executables in out32dll. If you want to try the tests then do: > nmake -f ms\ntdll.mak test =============================== The following shows the output of the above commands completing successfully. c:\work\public.cowhamr.openssl\1.0.1j>perl -v This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2012, Larry Wall Binary build 1604 [298023] provided by ActiveState http://www.ActiveState.com Built Apr 14 2014 14:32:20 c:\work\public.cowhamr.openssl\1.0.1j>perl Configure VC-WIN32 Configuring for VC-WIN32 no-ec_nistp_64_gcc_128 [default] OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir) no-gmp [default] OPENSSL_NO_GMP (skip dir) no-jpake [experimental] OPENSSL_NO_JPAKE (skip dir) no-krb5 [krb5-flavor not specified] OPENSSL_NO_KRB5 no-md2 [default] OPENSSL_NO_MD2 (skip dir) no-rc5 [default] OPENSSL_NO_RC5 (skip dir) no-rfc3779 [default] OPENSSL_NO_RFC3779 (skip dir) no-sctp [default] OPENSSL_NO_SCTP (skip dir) no-shared [default] no-store [experimental] OPENSSL_NO_STORE (skip dir) no-unit-test [default] OPENSSL_NO_UNIT_TEST (skip dir) no-zlib [default] no-zlib-dynamic [default] IsMK1MF=1 CC =cl CFLAG =-DOPENSSL_THREADS -DDSO_WIN32 -W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL _ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_AS M_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM EX_LIBS = CPUID_OBJ =x86cpuid.o BN_ASM =bn-586.o co-586.o x86-mont.o x86-gf2m.o DES_ENC =des-586.o crypt586.o AES_ENC =aes-586.o vpaes-x86.o aesni-x86.o BF_ENC =bf-586.o CAST_ENC =cast-586.o RC4_ENC =rc4-586.o RC5_ENC =rc5-586.o MD5_OBJ_ASM =md5-586.o SHA1_OBJ_ASM =sha1-586.o sha256-586.o sha512-586.o RMD160_OBJ_ASM=rmd-586.o CMLL_ENC =cmll-x86.o MODES_OBJ =ghash-x86.o ENGINES_OBJ = PROCESSOR = RANLIB =true ARFLAGS = PERL =perl THIRTY_TWO_BIT mode BN_LLONG mode RC4_INDEX mode RC4_CHUNK is undefined Configured for VC-WIN32. --------------------- c:\work\public.cowhamr.openssl\1.0.1j>ms\do_ms c:\work\public.cowhamr.openssl\1.0.1j>perl util\mkfiles.pl 1>MINFO c:\work\public.cowhamr.openssl\1.0.1j>perl util\mk1mf.pl no-asm VC-WIN32 1>ms\nt.mak c:\work\public.cowhamr.openssl\1.0.1j>perl util\mk1mf.pl dll no-asm VC-WIN32 1>ms\ntdll.mak c:\work\public.cowhamr.openssl\1.0.1j>if x == x goto skipce c:\work\public.cowhamr.openssl\1.0.1j>perl util\mkdef.pl 32 libeay 1>ms\libeay32.def c:\work\public.cowhamr.openssl\1.0.1j>perl util\mkdef.pl 32 ssleay 1>ms\ssleay32.def ------------------------- nmake -f ms\ntdll.mak Finishes with: cl /Fotmp32dll\openssl.obj -DMONOLITH -Iinc32 -Itmp32dll /MD /Ox /O2 /Ob2 -DOPENSSL_THREADS -DDSO_WIN32 -W3 -Gs 0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_BN_ASM_P ART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DOPENSSL_USE_APPLINK -I. -DOPENSSL_NO_RC5 -DOPENSSL_NO_ MD2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_STATIC_ENGINE /Zi /Fdtmp32dll/app -c .\apps\openssl.c openssl.c link /nologo /subsystem:console /opt:ref /debug /out:out32dll\openssl.exe @C:\Users\ROBERT~1\AppData\Local\Temp\ nm337C.tmp Creating library tmp32dll\junk.lib and object tmp32dll\junk.exp IF EXIST out32dll\openssl.exe.manifest mt -nologo -manifest out32dll\openssl.exe.manifest -outputresource:out32d ll\openssl.exe;1 --------------------- The results are now in out32dll (for 1.0.1j - previously they were in out32). These results have been checked in. Then check in: