codefast
codefast

Reputation: 91

C++ Linker Errors - error LNK2005: ... already defined

I have a project that builds correctly in x64 bit but throws errors looking like this in 32bit: libeay32-s-MT.lib(err.obj) : error LNK2005: _ERR_error_string already defined in libcrypto.lib(libcrypti-1_1.dll)

There's a list of these but they all look similar. Not sure if this is related with the fact that it throws the error in 32 bit, or whether it's something else in the configuration. Anyone had something similar? I am using VS2017 and Windows.

Upvotes: 0

Views: 1591

Answers (1)

Yujian Yao - MSFT
Yujian Yao - MSFT

Reputation: 954

The error message indicates that the problem comes from the library file. Please check whether there is a problem with duplicate definitions and the compatibility of the library. I suggest you read this document, which provides some solutions for your reference.

Upvotes: 1

Related Questions