cpp-best-practices/cmake_template

Using MSVC debug-builds fail due to MDd linkage

psyinf opened this issue · 2 comments

psyinf commented

Building the MSVC debug targets currently fails due to unsupported mix of debug runtime and 'fsanitize=address' option
error : invalid argument '-MDd' not allowed with '-fsanitize=address' [clang-diagnostic-error]
note: AddressSanitizer doesn't support linking with debug runtime libraries yet
Error while processing E:\develop\projects\ad_astra\src\sample_library\sample_library.cpp.

I am struggling with this as well and I can't figure out why. According to Microsoft ASAN support seems to be fully enabled for /MDd reading here: https://devblogs.microsoft.com/cppblog/msvc-address-sanitizer-one-dll-for-all-runtime-configurations/. Has anyone had success solving this issue?

I just encountered this error as well while trying to build my newly created project for the first time. Will post an update if I figure out a workaround.