VC开发ppt时使用ppt控件MSPPT.OLB的问题

anchorwzhg 2007-10-31 01:13:37
我按CTRL+W,点击Add Class From a type Library 选择office安装路径下的MSPPT.OLB,把所有的类都添加上了,

在使用msppt.cpp里的某些函数的那个类中,我定义头文件:#include <atlbase.h>与#include “msppt.h”,
结果程序在编译的时候出现下面的错误:

Linking...
MainFrm.obj : error LNK2001: unresolved external symbol "public: void __thiscall _Application::Quit(void)" (?Quit@_Application@@QAEXXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: class CString __thiscall TextRange::GetText(void)" (?GetText@TextRange@@QAE?AVCString@@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: struct IDispatch * __thiscall TextFrame::GetTextRange(void)" (?GetTextRange@TextFrame@@QAEPAUIDispatch@@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: struct IDispatch * __thiscall Shape::GetTextFrame(void)" (?GetTextFrame@Shape@@QAEPAUIDispatch@@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall Shape::GetHasTextFrame(void)" (?GetHasTextFrame@Shape@@QAEJXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: struct IDispatch * __thiscall Shapes::Item(struct tagVARIANT const &)" (?Item@Shapes@@QAEPAUIDispatch@@ABUtagVARIANT@@@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: long __thiscall Shapes::GetCount(void)" (?GetCount@Shapes@@QAEJXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: struct IDispatch * __thiscall _Slide::GetShapes(void)" (?GetShapes@_Slide@@QAEPAUIDispatch@@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: struct IDispatch * __thiscall Slides::Item(struct tagVARIANT const &)" (?Item@Slides@@QAEPAUIDispatch@@ABUtagVARIANT@@@Z)
.
.
.
我工程的目录下有msppt.cpp与msppt.h两个文件,上面的函数调用也一样。

从这个症状来说好像是缺少lib库,不知道怎么加。


...全文
1162 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wshcdr 2010-12-04
  • 打赏
  • 举报
回复
顶一下
ggcat 2010-12-03
  • 打赏
  • 举报
回复
全力顶,希望高手解决呀,帮帮忙。努力中。
mapper 2007-12-05
  • 打赏
  • 举报
回复
我也遇到了类似的问题
只好在VC6中用相同的步骤添加,这样添加的接口只会加载到msppt.cpp与msppt.h两个文件中,而vs.2003/2005只能添加到不同的文件中,还没有CPP文件
然后把这两个接口添加到项目中,并把头文件包含就可以用了

3,245

社区成员

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

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