VS2008 对导入的类库编译会报一大堆的错误,何解?

lanhxg 2011-09-10 11:08:14
我VC下导入 office word 的msword.olb库 ,在设置->C++ ->预编译头 选择不适用 ,这样就解决了
但是我在VS2008 同样导入 msword.olb库 ,却无法解决 ,编译报了一大堆的错误 ,请问我应该怎么解决
我相信一定有解决的方法的!求解决方法


:\mytest\autoword\autoword\CApplication.h(3) : warning C4278: “ExitWindows”: 类型库“C:\\Program Files\\Microsoft Office\\Office14\\MSWORD.OLB”中的标识符已经是宏;使用“rename”限定符
1>e:\mytest\autoword\autoword\CApplication.h(3) : warning C4278: “FindText”: 类型库“C:\\Program Files\\Microsoft Office\\Office14\\MSWORD.OLB”中的标识符已经是宏;使用“rename”限定符
1>e:\mytest\autoword\autoword\CApplication.h(3) : warning C4278: “FindText”: 类型库“C:\\Program Files\\Microsoft Office\\Office14\\MSWORD.OLB”中的标识符已经是宏;使用“rename”限定符
1>e:\mytest\autoword\autoword\CApplication.h(3) : warning C4278: “FindText”: 类型库“C:\\Program Files\\Microsoft Office\\Office14\\MSWORD.OLB”中的标识符已经是宏;使用“rename”限定符
1>e:\mytest\autoword\autoword\CApplication.h(3) : warning C4278: “FindText”: 类型库“C:\\Program Files\\Microsoft Office\\Office14\\MSWORD.OLB”中的标识符已经是宏;使用“rename”限定符
1>e:\mytest\autoword\autoword\CApplication.h(3) : warning C4278: “FindText”: 类型库“C:\\Program Files\\Microsoft Office\\Office14\\MSWORD.OLB”中的标识符已经是宏;使用“rename”限定符
1>e:\mytest\autoword\autoword\CApplication.h(3) : warning C4278: “FindText”: 类型库“C:\\Program Files\\Microsoft Office\\Office14\\MSWORD.OLB”中的标识符已经是宏;使用“rename”限定符
1>e:\mytest\autoword\autoword\release\msword.tlh(1456) : error C2786: “BOOL (__stdcall *)(HDC,int,int,int,int)”: __uuidof 的操作数无效
1>e:\mytest\autoword\autoword\release\msword.tlh(1456) : error C2923: “_com_IIID”:“Rectangle”不是参数“_Interface”的有效 模板 类型变量
1> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\wingdi.h(3667) : 参见“Rectangle”的声明
1>e:\mytest\autoword\autoword\release\msword.tlh(1456) : error C3203: “_com_IIID”: 未专用化的类 模板 不能用作 模板 变量,该变量属于 模板 参数“_IIID”,应为 real 类型
1>e:\mytest\autoword\autoword\release\msword.tlh(1456) : error C2955: “_com_IIID”: 使用类 模板 需要 模板 参数列表
1> d:\sfwrsetup\VC\include\comip.h(40) : 参见“_com_IIID”的声明
1>e:\mytest\autoword\autoword\release\msword.tlh(7676) : warning C4003: “ExitWindows”宏的实参不足
1>e:\mytest\autoword\autoword\release\msword.tlh(7676) : error C2059: 语法错误 : “常量”
1>e:\mytest\autoword\autoword\release\msword.tlh(9637) : error C2146: 语法错误 : 缺少“;”(在标识符“Crop”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(9637) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(9637) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(9677) : error C2146: 语法错误 : 缺少“;”(在标识符“GetCrop”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(9677) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(9677) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(9677) : warning C4183: “GetCrop”: 缺少返回类型;假定为返回“int”的成员函数
1>e:\mytest\autoword\autoword\release\msword.tlh(12680) : error C2146: 语法错误 : 缺少“;”(在标识符“Fonts”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(12680) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(12680) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(12735) : error C2146: 语法错误 : 缺少“;”(在标识符“GetFonts”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(12735) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(12735) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(12735) : warning C4183: “GetFonts”: 缺少返回类型;假定为返回“int”的成员函数
1>e:\mytest\autoword\autoword\release\msword.tlh(16036) : error C2146: 语法错误 : 缺少“;”(在标识符“CustomXMLPart”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(16036) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(16036) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(16038) : error C2146: 语法错误 : 缺少“;”(在标识符“CustomXMLNode”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(16038) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(16038) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(16058) : error C2146: 语法错误 : 缺少“;”(在标识符“GetCustomXMLPart”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(16058) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(16058) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(16058) : warning C4183: “GetCustomXMLPart”: 缺少返回类型;假定为返回“int”的成员函数
1>e:\mytest\autoword\autoword\release\msword.tlh(16059) : error C2146: 语法错误 : 缺少“;”(在标识符“GetCustomXMLNode”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(16059) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(16059) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(16059) : warning C4183: “GetCustomXMLNode”: 缺少返回类型;假定为返回“int”的成员函数
1>e:\mytest\autoword\autoword\release\msword.tlh(17935) : error C2146: 语法错误 : 缺少“;”(在标识符“GradientStops”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(17935) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(17935) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(17949) : error C2146: 语法错误 : 缺少“;”(在标识符“PictureEffects”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(17949) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(17949) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(17999) : error C2146: 语法错误 : 缺少“;”(在标识符“GetGradientStops”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(17999) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(17999) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(17999) : warning C4183: “GetGradientStops”: 缺少返回类型;假定为返回“int”的成员函数
1>e:\mytest\autoword\autoword\release\msword.tlh(18021) : error C2146: 语法错误 : 缺少“;”(在标识符“GetPictureEffects”的前面)
1>e:\mytest\autoword\autoword\release\msword.tlh(18021) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(18021) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\mytest\autoword\autoword\release\msword.tlh(18021) : warning C4183: “GetPictureEffects”: 缺少返回类型;假定为返回“int”的成员函数
...全文
481 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
woshixingrufeng 2011-10-24
  • 打赏
  • 举报
回复
可参考这篇文:
http://www.cr173.com/html/4229_1.html
masterz 2011-09-10
  • 打赏
  • 举报
回复
重命名有冲突的名字
#import "test.lib" no_namespace rename("OldName", "NewName")
#import和Adding an MFC Class from a Type Library用一个就够了,没有必要同时用。

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧