[Insight-users] Re: help on how to add new element to itk

Luis Ibanez luis.ibanez at kitware.com
Wed, 07 Jan 2004 19:33:37 -0500


Hi Luzhong,

The errors that you are getting are produced by the
linker. They indicate that the class Element2DC0LQM
is missing methods such as

     CLID()

This seems to indicate that your new FEM class is
missing the macro:

          FEM_ABSTRACT_CLASS()

or the macro

          FEM_CLASS()

Please look at the file

    Insight/Code/Numerics/FEM/itkFEMElement2DC0LinearLine.h

for an example on how the macro should be used.

or if you prefer, post the code of the header file
of your class and the code of the example file
test1.cxx  to the users-list.


Regards,


     Luis



------------------------
luzhong yin wrote:
> Dear Luis Ibanez,
> 
> Recently, I am trying to learn about how to use itk. I
> encounter some compile problem when I try to add some
> new finite element class to itk. What I have done is:
> 
> First, I downloaded InsightToolkit-1.4.0.zip to my
> computer and then compiled it and made the binary code
> available for all folds.
> 
> Then I code a new class of finite element under the
> framework of itk. That is, the element class Inherits
> all the necessary part from itk. The files for the
> element class is in a local fold. I also wrote a small
> testing problem for the new element in the same fold.
> But I got some compile errors:
> 
> test1.cxx
> Linking...
> test1.obj : error LNK2001: unresolved external symbol
> "public: static int __cdecl
> itk::fem::Element2DC0LQM::CLID(void)"
> (?CLID at Element2DC0LQM at fem at itk at  at SAHXZ)
> test1.obj : error LNK2001: unresolved external symbol
> "public: __thiscall
> itk::fem::Element2DC0LQM::Element2DC0LQM(void)"
> (??0Element2DC0LQM at fem at itk at  at QAE at XZ)
> Debug/test1.exe : fatal error LNK1120: 2 unresolved
> externals
> Error executing link.exe.
> 
> What do those errors mean? It means that I cann't do
> that way to add some new element to itk? I use VC++
> 6.0.
> 
> 
> Thank you very much.
> Luzhong
>  
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>