[英]Project compile with MDd even when setting to MTd
I'm trying to compile an exe that depends on some other static projects.我正在尝试编译一个依赖于其他一些 static 项目的 exe。 Some of the projects depends on OpenCV libraries that compiled with
MTd
runtime library option.一些项目依赖于使用
MTd
运行时库选项编译的 OpenCV 库。 What I did is to set the runtime library of all my projects to MTd
(in the runtime library option on visual studio project's properties) as well.我所做的是将我所有项目的运行时库也设置为
MTd
(在 Visual Studio 项目属性的运行时库选项中)。 When I compile only the static projects everything going well, but when I compile the exe file I get an error like this:当我只编译 static 项目时一切顺利,但是当我编译 exe 文件时,我收到如下错误:
Transform_Static.lib (Transform.obj: error LNK2038: mismatch detected for 'Runtime Library' value 'MDd_DynamicDebug' dosen't match value 'MTd_StaticDebug' in Math_UT.obj
I tried to add/remove libs from the linker dependencies of the exe project but nothing change, what else can I do?我试图从 exe 项目的 linker 依赖项中添加/删除库,但没有任何改变,我还能做什么? thanks.
谢谢。
First, You could check if Runtime Library
is MTd
.首先,您可以检查
Runtime Library
是否为MTd
。
Then, you could clean the project and rebuild the project.然后,您可以清理项目并重建项目。
Also, you could refer to Microsoft Docs about LNK2038 and the similar question .此外,您可以参考 Microsoft Docs 关于LNK2038和类似问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.