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

Robert Smith wmk589 at
Wed Apr 28 19:22:07 UTC 2021

 Hi Jan,

Thank you for your response.
Obviously the file mem_dbg is not included and that is why I am having this problem.

The questions are: 
Whether the "enable-crypto-mdebug" flag supported in Windows at all?
Whether this is known issue?
What control do I have over Windows build (I mean how can I include or exclude certain file)? My assumption was if I have to mess with Windows build scripts, I am in the wrong direction. However I could be I wrong ...
Whether the file mem_dbg was excluded on purpose from Windows build?

    On Wednesday, April 28, 2021, 06:51:36 AM EDT, Jan Just Keijser <janjust at> wrote:  
 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the openssl-users mailing list