2012-06-16 3 views
1

Windows 용 openssl을 컴파일하려고합니다. 적절한 비주얼 스튜디오 프로젝트 파일이 없으면 처음으로 컴파일 한 것입니다. 내가 자식을 시작하기 전에 vcvarsall.bat를 발행하는 세부 사항을 제외하고 http://wp.libpf.com/?p=535 : Windows에서 OpenSSL 1.0.1 컴파일

나는 여기에 가이드를 따라 갔다. 슬프게도

지금 CL.EXE 오류 코드 내가이 문제를 해결하려면 어떻게 0x02로

을 반환? Windows 용 openSSL 1.0.1의 미리 컴파일 된 바이너리를 얻을 수있는 곳이 있습니까?

오류 로그 :

Building OpenSSL 
cl /Fotmp32\e_capi.obj -Iinc32 -Itmp32 -DOPENSSL_NO_HW /MT /Ox /O2 /Ob2 -DOPENSSL_THREADS -DDSO_WIN32 -DOPENSSL_NO_HW -W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_BF -DOPENSSL_NO_CAST -DOPENSSL_NO_DES -DOPENSSL_NO_DSA -DOPENSSL_NO_DH -DOPENSSL_NO_KRB5 -DOPENSSL_NO_GOST -DOPENSSL_NO_JPAKE -DOPENSSL_NO_DYNAMIC_ENGINE /Zl /Zi /Fdtmp32/lib -c .\engines\e_capi.c 
e_capi.c 
.\engines\e_capi.c(150) : error C2143: syntax error : missing '{' before '*' 
.\engines\e_capi.c(424) : error C2079: 'capi_dsa_method' uses undefined struct 'dsa_method' 
.\engines\e_capi.c(426) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'char [21]' 
.\engines\e_capi.c(427) : error C2078: too many initializers 
.\engines\e_capi.c(463) : warning C4013: 'DSA_get_ex_new_index' undefined; assuming extern returning int 
.\engines\e_capi.c(464) : warning C4013: 'DSA_OpenSSL' undefined; assuming extern returning int 
.\engines\e_capi.c(464) : warning C4047: '=' : 'const DSA_METHOD *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(465) : error C2224: left of '.dsa_do_verify' must have struct/union type 
.\engines\e_capi.c(465) : error C2037: left of 'dsa_do_verify' specifies undefined struct/union 'dsa_method' 
.\engines\e_capi.c(466) : error C2224: left of '.dsa_mod_exp' must have struct/union type 
.\engines\e_capi.c(466) : error C2037: left of 'dsa_mod_exp' specifies undefined struct/union 'dsa_method' 
.\engines\e_capi.c(467) : error C2224: left of '.bn_mod_exp' must have struct/union type 
.\engines\e_capi.c(467) : error C2037: left of 'bn_mod_exp' specifies undefined struct/union 'dsa_method' 
.\engines\e_capi.c(538) : warning C4133: 'function' : incompatible types - from 'int *' to 'const DSA_METHOD *' 
.\engines\e_capi.c(700) : warning C4013: 'DSA_new_method' undefined; assuming extern returning int 
.\engines\e_capi.c(700) : warning C4047: '=' : 'DSA *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(703) : error C2037: left of 'p' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(704) : error C2037: left of 'q' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(705) : error C2037: left of 'g' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(706) : error C2037: left of 'pub_key' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(707) : error C2037: left of 'p' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(707) : error C2037: left of 'q' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(707) : error C2037: left of 'g' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(707) : error C2037: left of 'pub_key' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(709) : error C2037: left of 'p' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(709) : warning C4133: 'function' : incompatible types - from 'unsigned char *' to 'BIGNUM *' 
.\engines\e_capi.c(709) : warning C4047: 'function' : 'unsigned char *' differs in levels of indirection from 'DWORD' 
.\engines\e_capi.c(709) : warning C4024: 'lend_tobn' : different types for formal and actual parameter 2 
.\engines\e_capi.c(709) : error C2198: 'lend_tobn' : too few arguments for call 
.\engines\e_capi.c(712) : error C2037: left of 'q' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(712) : warning C4133: 'function' : incompatible types - from 'unsigned char *' to 'BIGNUM *' 
.\engines\e_capi.c(712) : warning C4047: 'function' : 'unsigned char *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(712) : warning C4024: 'lend_tobn' : different types for formal and actual parameter 2 
.\engines\e_capi.c(712) : error C2198: 'lend_tobn' : too few arguments for call 
.\engines\e_capi.c(715) : error C2037: left of 'g' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(715) : warning C4133: 'function' : incompatible types - from 'unsigned char *' to 'BIGNUM *' 
.\engines\e_capi.c(715) : warning C4047: 'function' : 'unsigned char *' differs in levels of indirection from 'DWORD' 
.\engines\e_capi.c(715) : warning C4024: 'lend_tobn' : different types for formal and actual parameter 2 
.\engines\e_capi.c(715) : error C2198: 'lend_tobn' : too few arguments for call 
.\engines\e_capi.c(718) : error C2037: left of 'pub_key' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(718) : warning C4133: 'function' : incompatible types - from 'unsigned char *' to 'BIGNUM *' 
.\engines\e_capi.c(718) : warning C4047: 'function' : 'unsigned char *' differs in levels of indirection from 'DWORD' 
.\engines\e_capi.c(718) : warning C4024: 'lend_tobn' : different types for formal and actual parameter 2 
.\engines\e_capi.c(718) : error C2198: 'lend_tobn' : too few arguments for call 
.\engines\e_capi.c(722) : warning C4013: 'DSA_set_ex_data' undefined; assuming extern returning int 
.\engines\e_capi.c(727) : warning C4013: 'EVP_PKEY_assign_DSA' undefined; assuming extern returning int 
.\engines\e_capi.c(748) : warning C4013: 'DSA_free' undefined; assuming extern returning int 
.\engines\e_capi.c(952) : error C2143: syntax error : missing '{' before '*' 
.\engines\e_capi.c(957) : error C2065: 'DSA_SIG' : undeclared identifier 
.\engines\e_capi.c(957) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(957) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *' 
.\engines\e_capi.c(957) : error C2106: '=' : left operand must be l-value 
.\engines\e_capi.c(958) : error C2275: 'CAPI_KEY' : illegal use of this type as an expression 
     .\engines\e_capi.c(124) : see declaration of 'CAPI_KEY' 
.\engines\e_capi.c(958) : error C2065: 'capi_key' : undeclared identifier 
.\engines\e_capi.c(959) : error C2275: 'CAPI_CTX' : illegal use of this type as an expression 
     .\engines\e_capi.c(123) : see declaration of 'CAPI_CTX' 
.\engines\e_capi.c(959) : error C2065: 'ctx' : undeclared identifier 
.\engines\e_capi.c(960) : error C2143: syntax error : missing ';' before 'type' 
.\engines\e_capi.c(962) : error C2065: 'ctx' : undeclared identifier 
.\engines\e_capi.c(962) : error C2037: left of 'engine' specifies undefined struct/union 'dsa_st' 
.\engines\e_capi.c(962) : warning C4047: 'function' : 'const ENGINE *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(962) : warning C4024: 'ENGINE_get_ex_data' : different types for formal and actual parameter 1 
.\engines\e_capi.c(962) : error C2198: 'ENGINE_get_ex_data' : too few arguments for call 
.\engines\e_capi.c(962) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *' 
.\engines\e_capi.c(964) : error C2065: 'ctx' : undeclared identifier 
.\engines\e_capi.c(964) : warning C4047: 'function' : 'CAPI_CTX *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(964) : warning C4024: 'CAPI_trace' : different types for formal and actual parameter 1 
.\engines\e_capi.c(966) : error C2065: 'capi_key' : undeclared identifier 
.\engines\e_capi.c(966) : warning C4013: 'DSA_get_ex_data' undefined; assuming extern returning int 
.\engines\e_capi.c(968) : error C2065: 'capi_key' : undeclared identifier 
.\engines\e_capi.c(981) : error C2065: 'capi_key' : undeclared identifier 
.\engines\e_capi.c(981) : error C2223: left of '->hprov' must point to struct/union 
.\engines\e_capi.c(981) : warning C4047: 'function' : 'DWORD' differs in levels of indirection from 'HCRYPTHASH *' 
.\engines\e_capi.c(981) : warning C4024: 'CryptCreateHash' : different types for formal and actual parameter 4 
.\engines\e_capi.c(981) : error C2198: 'CryptCreateHash' : too few arguments for call 
.\engines\e_capi.c(998) : error C2065: 'csigbuf' : undeclared identifier 
.\engines\e_capi.c(999) : error C2065: 'capi_key' : undeclared identifier 
.\engines\e_capi.c(999) : error C2223: left of '->keyspec' must point to struct/union 
.\engines\e_capi.c(999) : warning C4047: 'function' : 'DWORD' differs in levels of indirection from 'void *' 
.\engines\e_capi.c(999) : warning C4024: 'CryptSignHashA' : different types for formal and actual parameter 2 
.\engines\e_capi.c(999) : error C2065: 'csigbuf' : undeclared identifier 
.\engines\e_capi.c(999) : warning C4133: 'function' : incompatible types - from 'DWORD *' to 'BYTE *' 
.\engines\e_capi.c(999) : error C2198: 'CryptSignHashA' : too few arguments for call 
.\engines\e_capi.c(1007) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1007) : warning C4013: 'DSA_SIG_new' undefined; assuming extern returning int 
.\engines\e_capi.c(1008) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1010) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1010) : error C2223: left of '->r' must point to struct/union 
.\engines\e_capi.c(1011) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1011) : error C2223: left of '->s' must point to struct/union 
.\engines\e_capi.c(1012) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1012) : error C2223: left of '->r' must point to struct/union 
.\engines\e_capi.c(1012) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1012) : error C2223: left of '->s' must point to struct/union 
.\engines\e_capi.c(1014) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1014) : error C2223: left of '->r' must point to struct/union 
.\engines\e_capi.c(1014) : error C2065: 'csigbuf' : undeclared identifier 
.\engines\e_capi.c(1014) : warning C4047: 'function' : 'BIGNUM *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(1014) : warning C4024: 'lend_tobn' : different types for formal and actual parameter 1 
.\engines\e_capi.c(1014) : warning C4047: 'function' : 'unsigned char *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(1014) : warning C4024: 'lend_tobn' : different types for formal and actual parameter 2 
.\engines\e_capi.c(1014) : error C2198: 'lend_tobn' : too few arguments for call 
.\engines\e_capi.c(1015) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1015) : error C2223: left of '->s' must point to struct/union 
.\engines\e_capi.c(1015) : error C2065: 'csigbuf' : undeclared identifier 
.\engines\e_capi.c(1015) : warning C4047: 'function' : 'BIGNUM *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(1015) : warning C4024: 'lend_tobn' : different types for formal and actual parameter 1 
.\engines\e_capi.c(1015) : warning C4047: 'function' : 'unsigned char *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(1015) : warning C4024: 'lend_tobn' : different types for formal and actual parameter 2 
.\engines\e_capi.c(1015) : error C2198: 'lend_tobn' : too few arguments for call 
.\engines\e_capi.c(1017) : warning C4013: 'DSA_SIG_free' undefined; assuming extern returning int 
.\engines\e_capi.c(1017) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1018) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1018) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *' 
.\engines\e_capi.c(1026) : error C2065: 'csigbuf' : undeclared identifier 
.\engines\e_capi.c(1026) : warning C4022: 'OPENSSL_cleanse' : pointer mismatch for actual parameter 1 
.\engines\e_capi.c(1028) : error C2065: 'ret' : undeclared identifier 
.\engines\e_capi.c(1028) : warning C4047: 'return' : 'int *' differs in levels of indirection from 'int' 
.\engines\e_capi.c(1034) : warning C4047: '=' : 'CAPI_KEY *' differs in levels of indirection from 'int' 

답변

0

내가 같은 문제 다 퉜다. 조사 할 때 실제로 openssl 폴더에 include 및 inc32라는 두 개의 디렉토리가 있음을 발견했습니다. 'include'폴더에있는 파일은 유효한 C/C++ 헤더가 아니지만, 어떤 이유로 컴 파일러가 inc32 대신에이 include 디렉토리를 사용합니다 (제 경우에는 범인이 내가 사용했던 다른 사용자가 만든 일괄 처리 스크립트였습니다). 도움이 되길 바랍니다!

+1

어떻게 해결하는 방법? – nalply

+0

나는 똑같은 문제에 직면 해있다. 그러나 나는 내 openssl에 폴더 만 포함하고있다. –

0
init_xp.cmd 
call "%VS140COMNTOOLS%\..\..\VC\bin\vcvars32.bat" 

set __OPENSSL_VER__=102l 
perl Configure VC-WIN32 no-shared threads --prefix=C:\Dev\OpenSSL_%__OPENSSL_VER__%_vs2015_32_xp --openssldir=C:\Dev\OpenSSL_Config_%__OPENSSL_VER__% 
if ERRORLEVEL 1 goto :ERROR 
call ms\do_ms 
call ms\do_nasm 
nmake -f ms\nt.mak clean 
nmake -f ms\nt.mak 
nmake -f ms\nt.mak install 

그것은 나에게 도움이 : 'MS를 호출 \ do_ms'

관련 문제