VS2008 SP1构建ATL项目由于错误C1902而失败 [英] VS2008 SP1 build ATL project fails due to error C1902

查看:104
本文介绍了VS2008 SP1构建ATL项目由于错误C1902而失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的操作系统是x64.WinServer 2003 SP2。

打开VS2008 SP1,文件 - >新项目....->""ATL项目"

Open VS2008 SP1,File->New Project....->"ATL Project"

在ATL项目向导中,确保服务器类型是"动态链接库(DLL)"。然后点击"完成"。

In the ATL Project Wizard, ensure that the server type is "Dynamic-link library (DLL)"  and then click "Finish".

然后构建解决方案:




错误列表

推荐答案

我不能,但我会碰到这个项目,因为我我得到的东西非常相似(也使用VS2008 SP1)。我正在尝试创建一个ATL服务项目,我会遇到两个不同的问题,这取决于我是在XP(32位)还是Vista(64位)中尝试它。

在XP中(32) -bit):
我可以创建和编译项目,但我不能添加"ATL简单对象"。它。它告诉我:
"ATL类只能添加到MFC EXE和MFC常规DLL项目或具有完全ATL支持的项目。"


在Vista(64位)中:
我可以创建和编译项目,我可以添加一个"ATL Simple"对象",但我不能在类视图中向其接口添加任何方法。我没有确切的错误消息(无法在没有启动到Vista的情况下获取它),但它似乎将方法添加到类视图的底部窗格,但它没有在其他地方添加方法(不是IDL或任何标题或源文件)。


I can't, but I'll bump this item because I'm getting something very similar (also using VS2008 SP1). I'm trying to create an ATL service project, and I'm getting two different problems depending on whether I try it in XP (32-bit) or Vista (64-bit).

In XP (32-bit):
I can create and compile the project, but I can't add an "ATL Simple Object" to it. It tells me:
"ATL classes can only be added to MFC EXE and MFC Regular DLL projects or projects with full ATL support."

In Vista (64-bit):
I can create and compile the project, and I can add an "ATL Simple Object", but I can't add any methods to its interface in Class View. I don't have the exact error message (can't get it without booting into Vista), but it seemed to add the method to the bottom pane of the Class View, but it didn't add the method anywhere else (not to the IDL or to any headers or source files).



这篇关于VS2008 SP1构建ATL项目由于错误C1902而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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