iCAx开思工具箱

标题: 最近在研究用vs2005在R18 caa上做二次开发,添加工具条菜单时遇到如下link错误 谢谢 [打印本页]

作者: www_    时间: 2012-4-1 17:05
标题: 最近在研究用vs2005在R18 caa上做二次开发,添加工具条菜单时遇到如下link错误 谢谢


请给位用过的大侠们,帮忙看看,谢谢了{: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 ==========










作者: www_    时间: 2012-4-5 09:36
不知道有人遇到这样的问题没
谢谢大家关注
作者: www_    时间: 2012-4-5 10:41
这个问题搞了好几天都没有结果,请各位高手帮忙看看
作者: www_    时间: 2012-4-5 11:24
请高手给看看 是什么问题
作者: www_    时间: 2012-4-5 17:46
{:soso_e181:}
困扰好长时间了,请路过大侠 帮忙看看
方便的话,留下QQ,我把工程发送过去
祝 大家工作顺利
作者: xiazhiping    时间: 2012-5-10 20:02
你好,哥们,虽然我还对这个不熟悉,但是我也有问题真困扰着我,你有RADE破解文件吗,然后能告诉我怎么装的吗?在此表示万分感谢
作者: my_dear2002    时间: 2012-5-23 16:12
icax吃饱了撑的,选择文本的时候居然加了发布到腾讯微博,腾讯你干爹啊
作者: leihaizhe    时间: 2012-8-31 17:11
这个问题貌似在本论坛里得到解决了




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3