当前位置:编程学习 > C#/ASP.NET >>

编译时出的问题,/MTd和/clr incompatible,怎么办?

Vc++.NET 2005
一个解决方案里有一个没用到托管代码的项目,然后添加了一个WINFORM项目,编译时出现:
'/MTd' and '/clr' command-line options are incompatible
有没有办法解决啊? --------------------编程问答-------------------- 消灭零回复!!
帮顶,接分 --------------------编程问答-------------------- 能将你的sln下的project的类型说得再清楚些?!到底有哪些project,每个project是natived或managed或mixed?产生编译器错误的是哪个project?

--------------------编程问答-------------------- 如果设置了/CLR 必须确保Runtime library属性为(Debug)Multi-threaded Debug (/MDd)
(Release)Multi-threaded (/MD)
具体原因是什么调查中,有没有高手知道为什么必须这样设置? --------------------编程问答-------------------- If you are using the /clr compiler switch, your code will be linked with a static library, msvcmrt.lib. The static library provides a proxy between your managed code and the native CRT. You cannot use the statically linked CRT ( /MT or /MTd options) with /clr. Use the dynamically-linked libraries (/MD or /MDd) instead.
http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx
补充:.NET技术 ,  VC.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,