混合调试和发布MSVCRT库 [英] Mixing debug and release MSVCRT library
问题描述
我们的第三方供应商提供了使用"-DNDEBUG -DCHECKING -MD -O2 -Oy -Zi"构建的库。 (它们链接到非调试Microsoft库)。 我们的应用程序
的DEBUG风格编译为"-DMFCDebug -D_DEBUG -DDEBUG -DRWDEBUG
-MDd -Od -Z7" 选项。
Our 3rd party vendor provides libraries built with "-DNDEBUG -DCHECKING -MD -O2 -Oy -Zi" (they link to the non-debug Microsoft libraries). DEBUG flavor of our application is compiled with "-DMFCDebug -D_DEBUG -DDEBUG -DRWDEBUG -MDd -Od -Z7" option.
我们如何正确地将使用/ MD选项构建的外部库与使用/ MDd选项构建的应用程序链接?
注意:Windows 10,x64,VC 12编译器 先谢谢。
Note: Windows 10 , x64 , VC 12 compiler Thanks in advance.
推荐答案
好吧,
第三方供应商也应提供发布版本库。你不应该,通常也不能混合调试和非调试库。
the 3rd Party vendor should provide the release Version library too. You shouldn't and normally cannot mix debug- and nondebug-libraries.
例如:MySQL提供两个库,它们必须以正确的版本链接。
For example: MySQL provides both libraries and they must be linked in the correct build.
顺便说一下,我认为将调试库作为发行版本提供是愚蠢的。
By the way, I think it is stupid to provide a debug library as a Release Version.
请求供应商给你一个正确的版本。
So ask the vendor to give you a correct Version.
问候,Guido
这篇关于混合调试和发布MSVCRT库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!