Linker failure after compilation with "enable-crypto-mdebug"

Jan Just Keijser janjust at nikhef.nl
Wed Apr 28 10:51:22 UTC 2021


Hi,

On 26/04/21 20:29, Robert Smith via openssl-users wrote:
> Hello everyone.
>
> I'm trying to recompile OpenSSL version 1.1.1k under Windows 10 with 
> the following configuration flag enable-crypto-mdebug
> and getting the following linker error:
>
>
>  Creating library apps\openssl.lib and object apps\openssl.exp
> openssl.obj : error LNK2019: unresolved external symbol 
> _CRYPTO_mem_leaks referenced in function _main
> apps\openssl.exe : fatal error LNK1120: 1 unresolved externals
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual 
> Studio 10.0\VC\BIN\link.EXE"' : return code '0x460'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual 
> Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
>
> Wasted already a few hours trying to figure out the cause for this 
> failure.

when building and linking with "enable-crypto-mdebug" set the file 
"crypto/mem_dbg.o" needs to be included in the library libcrypto.a (or 
crypto.lib); check that this file is indeed included when creating the 
crypto library.

For the record: a Linux build with "enable-crypto-mdebug" works fine.

HTH,

JJK

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20210428/908dbd7c/attachment.html>


More information about the openssl-users mailing list