So, I've been able to build 0.9.8k successfully with VS 2008 (SP1) for 32-bit Windows. However, when I try it for x64 / AMD64, I get the following error:
cl /Fotmp64dll\ec_asn1.obj -Iinc32 -Itmp64dll /MD /Ox /Zi /W3 /Gs0 /GF /Gy /nologo -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DOPENSSL_SYSNAME_WIN32 -DOPENSSL_SYSNAME_WINNT -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_USE_APPLINK -I. /Fdout64dll -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_KRB5 -DOPENSSL_NO_DYNAMIC_ENGINE -D_WINDLL -DOPENSSL_BUILD_SHLIBCRYPTO -c .\crypto\ec\ec_asn1.c ec_asn1.c .\crypto\ec\ec_asn1.c(261) : error C2370: 'ECPKPARAMETERS_it' : redefinition; different storage class .\crypto\ec\ec_asn1.c(259) : see declaration of 'ECPKPARAMETERS_it' .\crypto\ec\ec_asn1.c(262) : error C2370: 'ECPKPARAMETERS_it' : redefinition; different storage class .\crypto\ec\ec_asn1.c(259) : see declaration of 'ECPKPARAMETERS_it' .\crypto\ec\ec_asn1.c(272) : error C2370: 'EC_PRIVATEKEY_it' : redefinition; different storage class .\crypto\ec\ec_asn1.c(270) : see declaration of 'EC_PRIVATEKEY_it' .\crypto\ec\ec_asn1.c(273) : error C2370: 'EC_PRIVATEKEY_it' : redefinition; different storage class .\crypto\ec\ec_asn1.c(270) : see declaration of 'EC_PRIVATEKEY_it' .\crypto\ec\ec_asn1.c(516) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data .\crypto\ec\ec_asn1.c(517) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data .\crypto\ec\ec_asn1.c(639) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data .\crypto\ec\ec_asn1.c(1248) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data .\crypto\ec\ec_asn1.c(1299) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data .\crypto\ec\ec_asn1.c(1407) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data .\crypto\ec\ec_asn1.c(1428) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data NMAKE : fatal error U1077: '"E:\Microsoft\Microsoft Visual Studio 9.0\VC\BIN\x86_amd64\cl.EXE"' : return code '0x2' Stop. I've tried building on 32-bit XP with the Visual Studio 2008 x64 Cross Tools Command Prompt, and also on a 64-bit Windows Server 2008 machine with both the Visual Studio 2008 x64 Cross Tools Command Prompt and the Visual Studio 2008 x64 Win64 Command Prompt. I've installed the latest ActivePerl. Then I pretty much follow the INSTALL.W64 suggestions: perl Configure VC-WIN64A --prefix=F:/Path/with/forward/slashes/to/avoid/a/different/error then call ms\do_win64a.bat then I edit the ms\ntdll.mak file to: - Add /Zi to the compiler flags - Add /DEBUG to the linker flags - Find/Replace tmp32dll to tmp64dll - Find/Replace out32dll to out64dll - For O_SSL add to the final link /DEBUG /PDB:$(OUT_D)/$(SSL).pdb - For O_CRYPTO add to the final link /DEBUG /PDB:$(OUT_D)/$(CRYPTO).pdb Then I run: nmake -f ms\ntdll.mak It goes along happily for a while. However, once it gets to ec_asn1.c, I get the error above. When searching the mailing list archives, I do see others that have had that error, but the follow-up is usually "did you run perl Configure VC-WIN32". I did do that for the x86 build, but I'm using VC-WIN64A for the x64/AMD64 build. FWIW, for a 32-bit build, VC-WIN32 and call ms\do_masm.bat work well for me with Visual Studio 2008. I'd appreciate any suggestions on how I can solve this, and get x64 to build successfully with Visual Studio 2008. Thanks! -Daniel