2

How do I read this error message from Visual Studio? Any clues as to what exactly is missing? This is a complex project and guessing is a rather ineffective approach - I'd prefer to know exactly what to look for.

1>------ Build started: Project: Crypto, Configuration: debug_shared x64 ------

1> Creating library ..\lib64\PocoCryptod.lib and object ..\lib64\PocoCryptod.exp 1>CipherImpl.obj : error LNK2019: unresolved external symbol EVP_CIPHER_CTX_block_size referenced in function "public: virtual unsigned __int64 __cdecl Poco::Crypto::`anonymous namespace'::CryptoTransformImpl::blockSize(void)const " (?blockSize@CryptoTransformImpl@?A0xbc3e4780@Crypto@Poco@@UEBA_KXZ)

1>CipherImpl.obj : error LNK2019: unresolved external symbol EVP_CipherInit referenced in function "public: __cdecl Poco::Crypto::anonymous namespace'::CryptoTransformImpl::CryptoTransformImpl(struct evp_cipher_st const *,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,enum Poco::Crypto::A0xbc3e4780::CryptoTransformImpl::Direction)" (??0CryptoTransformImpl@?A0xbc3e4780@Crypto@Poco@@QEAA@PEBUevp_cipher_st@@AEBV?$vector@EV?$allocator@E@std@@@std@@1W4Direction@0123@@Z) 1>CipherImpl.obj : error LNK2019: unresolved external symbol EVP_CipherUpdate referenced in function "public: virtual __int64 __cdecl Poco::Crypto::anonymous namespace'::CryptoTransformImpl::transform(unsigned char const *,__int64,unsigned char *,__int64)" (?transform@CryptoTransformImpl@?A0xbc3e4780@Crypto@Poco@@UEAA_JPEBE_JPEAE1@Z)

Full error list here https://gist.github.com/anonymous/91a76564651be4ac43fc

A.B.
  • 15,364
  • 3
  • 61
  • 64

3 Answers3

3

You read it as

error LNK2019: unresolved external symbol EVP_CIPHER_CTX_block_size

The symbol EVP_CIPHER_CTX_block_size cannot be found.

referenced in function "public: virtual unsigned __int64 __cdecl Poco::Crypto::`anonymous namespace'::CryptoTransformImpl::blockSize(void)const " (?blockSize@CryptoTransformImpl@?A0xbc3e4780@Crypto@Poco@@UEBA_KXZ)

You are attempting to use it in CryptoTransformImpl::blockSize(void)const (which is inside an anonymous namespace inside Poco::Crypto.

This can mean you didn't link against the library that exports that symbol.

Community
  • 1
  • 1
Luchian Grigore
  • 253,575
  • 64
  • 457
  • 625
1

EVP_.... are define in OpenSSL. So you have to link with OpenSSL statically or dynamically.

alexbuisson
  • 7,699
  • 3
  • 31
  • 44
  • I suspected it had something to do with OpenSSL. – A.B. Jul 27 '13 at 11:56
  • How do I link with OpenSSL exactly? I've added "Additional Library Directories" pointing to the OpenSSL root folder containing dlls, and to its /lib subdirectory containing lib files, and to its /lib/VC subdirectory containing some other lib files for good measure. The errors are still the same. – A.B. Jul 27 '13 at 12:11
  • Don't remember the OpenSSL license, and I don't know your project, but depending how you link check if there is a bad side effect on lisencing! Now to link with a lib static open your project properties, Linker, in additional lib folder, put the full path to the openSSL lib folder. and in the additional lib, put the name of the openSSL lib (it may depend of how you build it) – alexbuisson Jul 27 '13 at 12:20
0

You are missing the dll containing the EVP_CipherInit function in your library path.

Femaref
  • 60,705
  • 7
  • 138
  • 176