iCAx开思工具箱

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 25811|回复: 7
打印 上一主题 下一主题

最近在研究用vs2005在R18 caa上做二次开发,添加工具条菜单时遇到如下link错误 谢谢

[复制链接]
跳转到指定楼层
楼主
发表于 2012-4-1 17:05:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x


请给位用过的大侠们,帮忙看看,谢谢了{:soso_e181:}

MyNewAddin3.h头文件定义
// COPYRIGHT Dassault Systemes 2010
//===================================================================
//
// MyNewAddin3.h
// Provide implementation to interface
//    CATIPrtWksAddin

//
//===================================================================
//
// Usage notes:
//
//===================================================================
//CAA2 Wizard Generation Report
//IMPLEMENTATION
//    TIE: CATIPrtWksAddin

//End CAA2 Wizard Generation Report
//
//  Mar 2010  Creation: Code generated by the CAA wizard  Administrator
//===================================================================
#ifndef MyNewAddin3_H
#define MyNewAddin3_H

#include "CATBaseUnknown.h"
#include "CATCmdContainer.h"

//-----------------------------------------------------------------------

/**
* Class representing xxx.
*
* <br><b>Role</b>: Provide the basic class function...
* <p>
* It implements the interfaces :
*  <ol>
*  <li>@href CATIPrtWksAddin
*  </ol>
*
* @href ClassReference, Class#MethodReference, #InternalMethod...
*/
class MyNewAddin3: public CATBaseUnknown
//class MyNewAddin3: public CATIWorkbenchAddin

{
  CATDeclareClass;

  public:

  // Standard constructors and destructors for an implementation class
  // -----------------------------------------------------------------
     MyNewAddin3 ();
     virtual ~MyNewAddin3 ();


  private:
  // The copy constructor and the equal operator must not be implemented
  // -------------------------------------------------------------------
  MyNewAddin3 (MyNewAddin3 &);
  MyNewAddin3& operator=(MyNewAddin3&);

public:

        void CreateCommands();
        CATCmdContainer * CreateToolbars();


};

//-----------------------------------------------------------------------

#endif


MyNewAddin3.cpp定义
// COPYRIGHT Dassault Systemes 2010
//===================================================================
//
// MyNewAddin3.cpp
// Provide implementation to interface
//    CATIPrtWksAddin
//
//===================================================================
//
// Usage notes:
//
//===================================================================
//  Mar 2010  Creation: Code generated by the CAA wizard  Administrator
//===================================================================
#include "MyNewAddin3.h"
#include "CATCreateWorkshop.h"

#include "CATCommandHeader.h"
MacDeclareHeader(PartCmdHeader);

CATImplementClass(MyNewAddin3,
                  Implementation,
                  CATBaseUnknown,
                  CATnull );


//-----------------------------------------------------------------------------
// MyNewAddin3 : constructor
//-----------------------------------------------------------------------------
MyNewAddin3::MyNewAddin3():
    CATBaseUnknown()
{
}

//-----------------------------------------------------------------------------
// MyNewAddin3 : destructor
//-----------------------------------------------------------------------------
MyNewAddin3::~MyNewAddin3()
{
}

// Link the implementation to its interface
// ---------------------------------------


void MyNewAddin3::CreateCommands()
{
        new PartCmdHeader("point","CmdModule","TestCmd",(void *)NULL);
        new PartCmdHeader("line","CmdModule","LinCmd",(void *)NULL);
}

CATCmdContainer * MyNewAddin3::CreateToolbars()
{
        NewAccess(CATCmdContainer,pPartBenchTlb,PartBenchTlb);
        NewAccess(CATCmdStarter,pPointCmd,PointCmd);
        SetAccessCommand(pPointCmd,"point");
        SetAccessChild(pPartBenchTlb,pPointCmd);
        NewAccess(CATCmdStarter,pLineCmd,LineCmd);
        SetAccessCommand(pLineCmd,"line");
        SetAccessNext(pPointCmd,pLineCmd);

        return NULL;
}


//TIE or TIEchain definitions
#include "TIE_CATIPrtWksAddin.h"
TIE_CATIPrtWksAddin(MyNewAddin3);


//Methods implementation





Imakefile.mk 文件内容如下:
# COPYRIGHT Dassault Systemes 2010
#======================================================================
# Imakefile for module MyFirstModule.m
#======================================================================
#
#  Mar 2010  Creation: Code generated by the CAA wizard  Administrator
#======================================================================
#
# SHARED LIBRARY
#
BUILT_OBJECT_TYPE=SHARED LIBRARY

# DO NOT EDIT :: THE CAA2 WIZARDS WILL ADD CODE HERE
WIZARD_LINK_MODULES = JS0GROUP \
JS0FM JS0GROUP CATMechanicalModelerUI MechanicalModelerUIUUID \
PrtWorkshop
# END WIZARD EDITION ZONE

LINK_WITH = $(WIZARD_LINK_MODULES)

# System dependant variables
#
OS = AIX
#
OS = HP-UX
#
OS = IRIX
#
OS = SunOS
#
OS = Windows_NT


错误信息如下
------ Rebuild All started: Project: MyFirstModule.m, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'MyFirstModule.m', configuration 'Debug|Win32'
Compiling...
MyNewAddin3.cpp
Linking...
MyNewAddin3.obj : error LNK2019: unresolved external symbol "public: static class CATMetaClass * __cdecl CATCommandHeader::MetaObject(void)" (?MetaObject@CATCommandHeader@@SAPAVCATMetaClass@@XZ) referenced in function "public: static class CATMetaClass * __cdecl PartCmdHeader::MetaObject(void)" (?MetaObject@PartCmdHeader@@SAPAVCATMetaClass@@XZ)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CATBaseUnknown:ueryInterface(struct _GUID const &,void * *)" (?QueryInterface@CATBaseUnknown@@UAEJABU_GUID@@PAPAX@Z)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall CATBaseUnknown::AddRef(void)" (?AddRef@CATBaseUnknown@@UAEKXZ)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall CATBaseUnknown::Release(void)" (?Release@CATBaseUnknown@@UAEKXZ)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CATBaseUnknown::GetTypeInfoCount(unsigned int *)" (?GetTypeInfoCount@CATBaseUnknown@@UAEJPAI@Z)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CATBaseUnknown::GetTypeInfo(unsigned int,unsigned long,struct ITypeInfo * *)" (?GetTypeInfo@CATBaseUnknown@@UAEJIKPAPAUITypeInfo@@@Z)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CATBaseUnknown::GetIDsOfNames(struct _GUID const &,wchar_t * *,unsigned int,unsigned long,long *)" (?GetIDsOfNames@CATBaseUnknown@@UAEJABU_GUID@@PAPA_WIKPAJ@Z)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CATBaseUnknown::Invoke(long,struct _GUID const &,unsigned long,unsigned short,struct tagDISPPARAMS *,struct tagVARIANT *,struct tagEXCEPINFO *,unsigned int *)" (?Invoke@CATBaseUnknown@@UAEJJABU_GUID@@KGPAUtagDISPPARAMS@@PAUtagVARIANT@@PAUtagEXCEPINFO@@PAI@Z)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual class CATBaseUnknown * __thiscall CATBaseUnknown::GetImpl(int)const " (?GetImpl@CATBaseUnknown@@UBEPAV1@H@Z)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual class CATBaseUnknown * __thiscall CATBaseUnknown::SetImpl(class CATBaseUnknown *)" (?SetImpl@CATBaseUnknown@@UAEPAV1@PAV1@@Z)
MyNewAddin3.obj : error LNK2019: unresolved external symbol "public: static class CATMetaClass * __cdecl CATBaseUnknown::MetaObject(void)" (?MetaObject@CATBaseUnknown@@SAPAVCATMetaClass@@XZ) referenced in function "public: static class CATMetaClass * __cdecl MyNewAddin3::MetaObject(void)" (?MetaObject@MyNewAddin3@@SAPAVCATMetaClass@@XZ)
MyNewAddin3.obj : error LNK2019: unresolved external symbol "struct _GUID IID_CATIPrtWksAddin" (?IID_CATIPrtWksAddin@@3U_GUID@@A) referenced in function "public: static class CATMetaClass * __cdecl TIECATIPrtWksAddinMyNewAddin3::MetaObject(void)" (?MetaObject@TIECATIPrtWksAddinMyNewAddin3@@SAPAVCATMetaClass@@XZ)
MyNewAddin3.obj : error LNK2019: unresolved external symbol "public: static class CATMetaClass * __cdecl CATIPrtWksAddin::MetaObject(void)" (?MetaObject@CATIPrtWksAddin@@SAPAVCATMetaClass@@XZ) referenced in function "public: static class CATMetaClass * __cdecl TIECATIPrtWksAddinMyNewAddin3::MetaObject(void)" (?MetaObject@TIECATIPrtWksAddinMyNewAddin3@@SAPAVCATMetaClass@@XZ)
MyNewAddin3.obj : error LNK2001: unresolved external symbol "public: virtual class CATMetaClass * __thiscall CATBaseUnknown::GetMetaObject(void)const " (?GetMetaObject@CATBaseUnknown@@UBEPAVCATMetaClass@@XZ)
MyNewAddin3.obj : error LNK2019: unresolved external symbol "long __cdecl Tie_GetIDsOfNames(struct IDispatch *,class CATMetaClass *,struct _GUID const &,wchar_t * *,unsigned int,unsigned long,long *)" (?Tie_GetIDsOfNames@@YAJPAUIDispatch@@PAVCATMetaClass@@ABU_GUID@@PAPA_WIKPAJ@Z) referenced in function "public: virtual long __thiscall TIECATIPrtWksAddinMyNewAddin3::GetIDsOfNames(struct _GUID const &,wchar_t * *,unsigned int,unsigned long,long *)" (?GetIDsOfNames@TIECATIPrtWksAddinMyNewAddin3@@UAEJABU_GUID@@PAPA_WIKPAJ@Z)
..\..\..\intel_a\code\bin\MyFirstModule.dll : fatal error LNK1120: 15 unresolved externals
Build log was saved at "file://c:\MyFirstWorkspace\ToolsData\VisualStudio2005\MyFirstFramework\Debug\BuildLog.htm"
MyFirstModule.m - 16 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========









分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 支持支持
沙发
 楼主| 发表于 2012-4-5 09:36:44 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
板凳
 楼主| 发表于 2012-4-5 10:41:12 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
地板
 楼主| 发表于 2012-4-5 11:24:00 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
5
 楼主| 发表于 2012-4-5 17:46:32 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
6
发表于 2012-5-10 20:02:54 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
7
发表于 2012-5-23 16:12:10 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
8
发表于 2012-8-31 17:11:40 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手板模型制作,在线3D打印服务

QQ|小黑屋|手机版|开思工具箱 CAD工具箱_CAM工具箱  

GMT+8, 2024-12-22 19:43 , Processed in 0.016187 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表