如何将现有的OpenSsl项目导入Xcode

时间:2017-02-08 07:52:55

标签: c++ xcode openssl

我想修改现有的Openssl项目。所以我从GitHub下载了openssl的源代码https://github.com/openssl/openssl 并按照http://openssl.6102.n7.nabble.com/Easy-inclusion-of-OpenSSL-into-iOS-projects-agileinfoways-com-td48905.html说明如何将Openssl包含到Xcode中。

但是,当我尝试从OpenSsl项目构建其中一个文件(enc.c)时,它会遇到6个错误和7个警告。

/usr/local/opt/openssl/include/openssl/ecdsa.h
/usr/local/opt/openssl/include/openssl/ecdsa.h:295:14: Parameter
'flags' not found in the function declaration
/usr/local/opt/openssl/include/openssl/ecdsa.h:301:14: Parameter                

'ecdsa_method' not found in the function declaration
/usr/local/opt/openssl/include/openssl/ecdsa.h:302:14: Parameter 'name'    not found in the function declaration

/Users/maggie/Documents/aes/openssl-master/apps/apps.h
/Users/maggie/Documents/aes/openssl-master/apps/apps.h:421:1: Unknown type name '__owur'
/Users/maggie/Documents/aes/openssl-master/apps/apps.h:421:8: Expected identifier or '('
/Users/maggie/Documents/aes/openssl-master/apps/apps.h:432:1: Unknown type name '__owur'
/Users/maggie/Documents/aes/openssl-master/apps/apps.h:432:8: Expected identifier or '('
/Users/maggie/Documents/aes/openssl-master/apps/progs.h
/Users/maggie/Documents/aes/openssl-master/apps/progs.h:25:1: Type specifier missing, defaults to 'int'

/Users/maggie/Documents/aes/openssl-master/apps/enc.c
/Users/maggie/Documents/aes/openssl-master/apps/enc.c:542:47: Expected ')'
/Users/maggie/Documents/aes/openssl-master/apps/enc.c:543:47: Expected ')'
/Users/maggie/Documents/aes/openssl-master/apps/enc.c:427:33: Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int'
/Users/maggie/Documents/aes/openssl-master/apps/enc.c:597:28: Implicit declaration of function 'OPENSSL_hexchar2int' is invalid in C99
/Users/maggie/Documents/aes/openssl-master/apps/enc.c:582:9: Implicit conversion loses integer precision: 'unsigned long' to 'int'    

enc.c的源代码是here

有没有人遇到过这个问题? 感谢。

0 个答案:

没有答案