毕设题目是用delphi 7 二次开发solidworks 建立标准件库,但在注册SldWorks_TLB后,运行文件显示错误 ,一切按照教程上设计编程,依然报错,错误如图
Warning] SldWorks_TLB.pas(43314): Method 'GetChildren' hides virtual method of base type 'TComponent'
  [Error] SldWorks_TLB.pas(43854): Identifier redeclared: 'CoEdge'
  [Warning] SldWorks_TLB.pas(45793): Method 'SetName' hides virtual method of base type 'TComponent'
  [Warning] SldWorks_TLB.pas(47587): Method 'SetName' hides virtual method of base type 'TComponent'
  [Warning] SldWorks_TLB.pas(48644): Method 'GetChildren' hides virtual method of base type 'TComponent'
  [Warning] SldWorks_TLB.pas(49694): Method 'SetName' hides virtual method of base type 'TComponent'
  [Warning] SldWorks_TLB.pas(53443): Method 'SetName' hides virtual method of base type 'TComponent'
  [Warning] SldWorks_TLB.pas(58781): Method 'GetChildren' hides virtual method of base type 'TComponent'
  [Warning] SldWorks_TLB.pas(69609): Method 'GetChildren' hides virtual method of base type 'TComponent'
  [Error] SldWorks_TLB.pas(96528): Identifier redeclared: 'CoEdge'
  [Error] SldWorks_TLB.pas(96533): Identifier redeclared: 'CoEdge'
  [Error] SldWorks_TLB.pas(96533): '=' expected but ')' found
  [Error] SldWorks_TLB.pas(43855): Unsatisfied forward or external declaration: '.71.Create'
  [Error] SldWorks_TLB.pas(43856): Unsatisfied forward or external declaration: '.71.CreateRemote'
  [Fatal Error] Unit1.pas(7): Could not compile used unit '..\DELPHI\1\Imports\SldWorks_TLB.pas'
   求大神指点一二,是solidworks版本问题还是什么?

解决方案 »

  1.   

     [Error] SldWorks_TLB.pas(43854): Identifier redeclared: 'CoEdge'CoEdge重复声明了打开导入的SldWorks_TLB.pas文件,去了重复声明,
    在某些情况下,导入其它系统的DLL文件,自动生成的TLB文件,会有重复声明的错误然后重新编译,直到通过,保存TLB文件。
      

  2.   


     你出现的那个错误,是很奇怪的事情,因这个sldwork_tlb.pas是类型库自动生成的,我这里也是这样,我很不明白为什么delphi的这个工具会翻译错误。为此,我这样解决:打开它,找到coEdge的定义,注释掉该行。目前为此,还没有问题~~~
      

  3.   

      [Error] SldWorks_TLB.pas(43854): Identifier redeclared: 'CoEdge'
    ---报错有重复声明的错
    CoEdge这个重复声明了