简体   繁体   中英

How to make Visual Studio (2019/2022) link to the normal runtime libraries during a debug build?

The reason I want to do this is because the debug libraries are littered with extra "assertion" statements that take ages to start with during remote debugging.

I hope it's only to replace Multi-threaded Debug DLL (/MDd) with Multi-threaded DLL (/MD) in Code Generation -> Runtime Library but I wonder if there are other changes one has to take into account as well?

This is doable and also good practice for remote debugging big and complex applications also exlained in Mixing debug and release library/binary - bad practice? .

Besides switching link libraries from Multi-threaded Debug DLL (/MDd) to Multi-threaded DLL (/MD) one needs to take into account debug macros like _ITERATOR_DEBUG_LEVEL which might otherwise conflict during linking. A typical error message that indicates such a conflic is error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL'

Once all the conflicting macros have been resolved it will link to the standard runtime libraries but the debug symbols for the application remains.

Also, @Adrian Mole thanks for the assistans in this matter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM