Visual Studio C++混合 MT 和 MD 库的解决方案

发布于 2025-01-12 05:42:52 字数 99 浏览 4 评论 0原文

我有一个 Visual Studio C++,其中包含几个项目和库。

一种是用MD选项编译的,另一种是用MT选项编译的。

有什么方法可以使这种设置起作用吗?

I have a Visual Studio C++ that includes a couple of projects and libs.

One is compiled with the MD option, the other one is compiled with the MT option.

Is there any way to make this kind of setup working?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怪异←思 2025-01-19 05:42:52

不应使用 /MD 和 /MT 编译单个二进制文件(dll/exe)。

库具有不同的代码来处理线程的启动和停止,即使编译工作正常,它也不一定工作

使用 Dll 来分离不同的风格,或者使它们全部一致

A single binary (dll/ exe) should not be compiled with /MD and /MT

The libraries have different code to cope with threads starting and stopping, and even if you get the compile working, it won't necessarily work

Use Dlls to separate the different styles, or make them all consistent

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文