找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
查看: 20224|回复: 9
打印 上一主题 下一主题

[求助] catia二次开发 连接错误,请路过高手帮忙看看【此错误已解决,内附方法,类似情况参考

[复制链接]
跳转到指定楼层
1
发表于 2012-4-5 16:24:13 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

马上注册,结交更多同行朋友,交流,分享,学习。

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

x
本帖最后由 www_ 于 2012-4-9 16:37 编辑

请给位用过的大侠们,帮忙看看,谢谢了{: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空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
10
发表于 2012-7-1 18:04:51 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

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

x
9
发表于 2012-5-30 08:17:04 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

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

x
8
 楼主| 发表于 2012-4-9 16:41:28 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

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

x
7
 楼主| 发表于 2012-4-9 09:21:34 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

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

x
6
发表于 2012-4-8 20:49:53 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

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

x
5
 楼主| 发表于 2012-4-7 13:23:55 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

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

x
4
发表于 2012-4-6 13:11:59 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

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

x
3
 楼主| 发表于 2012-4-6 09:46:44 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

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

x
2
 楼主| 发表于 2012-4-5 17:45:14 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

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

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

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2024-11-26 04:39 , Processed in 0.027869 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

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