VC开发ppt时使用ppt控件MSPPT.OLB的问题
我按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库,不知道怎么加。