Visual Studio C++混合 MT 和 MD 库的解决方案
我有一个 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不应使用 /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