hi, Thank you for your notes. Yes, my code is composed of both C and C++ code. For the openssl part, it is programed by C. And the other part is from C++. Should I only use "extern" for those C-realated "#include", or all the C code should be embraced in the "extern"? Thank you so much.
Best Regards, Xiang > Date: Tue, 13 Apr 2010 17:57:27 -0500 > From: wr...@rowe-clan.net > To: openssl-users@openssl.org > CC: luxiang...@hotmail.com > Subject: Re: ERROR LINK2019 > > On 4/13/2010 4:49 PM, 芦翔 wrote: > > Dear all, > > I am trying to add the security flavor to an application. To achieve > > this objective, I wrote the codes to establish a security tunnel between > > the server and the client with VC2008. When I build the whole project, > > there are tens of similar errors. All of them are as follows: > > > >>SSLServer.obj : error LNK2019: unresolved external symbol _BIO_free > > referenced in function "int __cdecl > > SSL_CTX_use_PrivateKey_file_pass(struct ssl_ctx_st *,char *,char *)" > > (?SSL_CTX_use_PrivateKey_file_pass@@YAHPAUssl_ctx_st@@p...@z > > <mailto:?SSL_CTX_use_PrivateKey_file_pass@@YAHPAUssl_ctx_st@@p...@z>) > > That signature is consistent with C++ argument folding. > > The openssl headers you've used probably were missing this decoration > > #ifdef __cplusplus > extern "C" { > #endif > > ... > > #ifdef __cplusplus > } > #endif > > So you should put your #include references in between the snippets above > (in place of the ... elipses). > _________________________________________________________________ SkyDrive电子画册,带你领略精彩照片,分享“美”时“美”刻! http://www.windowslive.cn/campaigns/e-magazine/ngmchina/?a=c