在Visual Studio 2005中设置/clr选项时出错 [英] Error when setting /clr option in Visual Studio 2005

查看:240
本文介绍了在Visual Studio 2005中设置/clr选项时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的应用程序(COM dll)在VS2003中.我将其升级到VS2005.使用编码

类(.NET Framework类)将公共语言运行时支持"设置更改为

/clr并在共享DLL中使用MFC.构建我的应用程序后,我收到错误消息

使用/MD [d](CRT dll版本)构建MFC应用程序需要MFC共享dll

版本.请#define _AFXDLL或不使用/MD [d].

为了获得零错误,我必须在代码生成"设置中进行设置.请注意

我在预处理器设置中定义了"_AFXDLL".

在此先感谢

Hi,

My application(COM dll) was in VS2003.I upgraded it into VS2005.For using Encoding

class(.NET Framework Class) changed the Common Language Runtime Support settings to

/clr and Use MFC in a Shared DLL.After building my application I got the error as

"Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll

version. Please #define _AFXDLL or do not use /MD[d]".

What I have to set in "Code Generation" settings for getting zero error.Please note

that I defined "_AFXDLL" in Preprocessor settings.

Thanks in advance

推荐答案

如果有任何
,请删除#include"Windows.h"语句
然后检查包含目录的顺序,尝试对其进行更改.(工具-> options->项目和解决方案-> VC ++目录)
Remove #include "Windows.h" statements if you have any

and then check the sequence of the include directories, Try to alter it.(Tools->options->Project and solutions->VC++ directories )


这篇关于在Visual Studio 2005中设置/clr选项时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆