[llvm-bugs] [Bug 48788] LNK2038 error: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' does not match value 'MDd_DynamicDebug' in RpgLexer.obj

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 19 10:19:46 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48788

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rnk at google.com
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Reid Kleckner <rnk at google.com> ---
Sorry, this is a limitation of the MSVC CRT. MSVC release and debug builds are
ABI incompatible and cannot be linked together.

You can, however, work around the issue by building your code in debug mode (no
optimizations, debug info enabled) without using the debug C runtime. Go into
your project settings and switch from /MDd to /MD. This will unset the _DEBUG
macro, switch the MSVC C runtime, and set _ITERATOR_DEBUG_LEVEL to 0.

So long as you do not use the _DEBUG macro in your code and you do not use MSVC
CRT debugging features, this should approximate the debug build configuration
fairly well.

The other workaround is to use LLVM debug libraries, but I suppose you have
already considered this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210119/4d2faffb/attachment.html>


More information about the llvm-bugs mailing list