[Insight-users] Classes / Libraries

Luis Ibanez luis.ibanez at kitware.com
Sat Sep 9 16:30:17 EDT 2006


Hi Christina,

Unfortunately there is not a direct way of finding in what library
you will find a class. However, you don't need to use nm to find
your way here.

Instead enjoy the advantages of Open Source: Browse the code.  :-)


The rule of thumb is that ITK creates a library per each one of
the directories in

                         Insight/Code/


and the library name matches the directory name, like ITKCommon,
ITKAlgorithms, ITKBasicFilter...

The symbol that you are looking for is itk::NumericTraits<float>::One,
the itkNumericTraits.cxx file is located in Insight/Code/Common, so
you will find the symbol in ITKCommon.lib.


               find . -name "*NumericTraits*"


would have led you to the "Insight/Code/Common" directory, and
therefore gave you the hint of using the ITKCommon library.
In general, if you are using ITK you always need ITKCommon,
and almost always, you need ITKIO too.



You may find interesting to use ctags, or SourceNavigator. Both
of them are excellent tools for browsing code in large projects
such as ITK and VTK.

          http://sourcenav.sourceforge.net/index.html

SourceNavigator is capable of browsing the combined source three
of VTK and ITK together.



      Regards,



         Luis



------------------------
Christina Roßmanith wrote:
> Hi,
> 
> I'm just starting using ITK. And a rather basic question seems to be: 
> How do I know which library contains which class (hopefully there is a 
> more elegant way than examining each lib with nm and grep). How do I 
> know which library do I have to add to TARGET_LINK_LIBRARIES to get rid 
> of the error message
> undefined reference to `itk::NumericTraits<float>::One'
> 
> Christina Rossmanith
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 




More information about the Insight-users mailing list