[Insight-users] Using ITK without cmake

Juan Cardelino juan.cardelino at gmail.com
Thu Jan 8 02:54:52 EST 2009


On Thu, Jan 8, 2009 at 1:57 AM, Matthew McCormick (thewtex) <
matt at mmmccormick.com> wrote:

> The files called CMakeLists.txt contain information on how the libraries
> are configured and their components.  You can simply look for the
> appropriate lines and variables.  Look for, e.g., instances of the
> ADD_LIBRARY() command.  If the variable depends on other variables and the
> valuable is non-obvious, you can use the MESSAGE() command ( see cmake help
> for usage ).to print out the value when doing a cmake configure.  However,
> itk has few library components since most of the code is templates that
> don't use explicit instantiation by default.
>
>>
>>
>
Thanks for your answer. I've been looking at that, but I still get some
weird errors. I think I'm missing something else, because I've double
checked the ordering of libraries and I'm kinda sure I've followed all the
dependencies.
Look at this for instance, I have a simple code that opens an image from
disk.
When I compile it, I get the  error below. Looking at it  my guess is that
the problem comes if the library containing ItkExceptionObject methods is
missing. However, doing an nm -s it comes out that all those constructors
are defined on libITKCommon.a which is given to linker after libITKIO.a
where I *pressume* ImageFileReaderException is defined.
Im kinda lost here. Has anyone run into a similar problem?
Thanks.

/home/juan/juanc/develop/gral/trunk/obj/add_noise_rgb.o: In function
`MemoryAllocationError':
/home/juan/juanc/soft/libs/include/InsightToolkit/Common/itkExceptionObject.h:174:
undefined reference to
`itk::ExceptionObject::ExceptionObject(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned int,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, std::basic_string<char, std::char_traits<char>, std::allocator<char>
> const&)'
/home/juan/juanc/develop/gral/trunk/obj/add_noise_rgb.o: In function
`ImageFileReaderException':
/home/juan/juanc/soft/libs/include/InsightToolkit/IO/itkImageFileReader.h:44:
undefined reference to `itk::ExceptionObject::ExceptionObject(char const*,
unsigned int, char const*, char const*)'
/home/juan/juanc/soft/libs/include/InsightToolkit/IO/itkImageFileReader.h:35:
undefined reference to
`itk::ExceptionObject::ExceptionObject(itk::ExceptionObject const&)'
/home/juan/juanc/soft/libs/include/InsightToolkit/IO/itkImageFileReader.h:44:
undefined reference to `itk::ExceptionObject::ExceptionObject(char const*,
unsigned int, char const*, char const*)'
/home/juan/juanc/soft/libs/include/InsightToolkit/IO/itkImageFileReader.h:35:
undefined reference to
`itk::ExceptionObject::ExceptionObject(itk::ExceptionObject const&)'
/home/juan/juanc/soft/libs/include/InsightToolkit/IO/itkImageFileReader.h:44:
undefined reference to `itk::ExceptionObject::ExceptionObject(char const*,
unsigned int, char const*, char const*)'
/home/juan/juanc/soft/libs/include/InsightToolkit/IO/itkImageFileReader.h:44:
undefined reference to `itk::ExceptionObject::ExceptionObject(char const*,
unsigned int, char const*, char const*)'
/home/juan/juanc/soft/libs/include/InsightToolkit/IO/itkImageFileReader.h:35:
undefined reference to
`itk::ExceptionObject::ExceptionObject(itk::ExceptionObject const&)'
/home/juan/juanc/soft/libs/include/InsightToolkit/IO/itkImageFileReader.h:44:
undefined reference to `itk::ExceptionObject::ExceptionObject(char const*,
unsigned int, char const*, char const*)'
/home/juan/juanc/soft/libs/include/InsightToolkit/IO/itkImageFileReader.h:35:
undefined reference to
`itk::ExceptionObject::ExceptionObject(itk::ExceptionObject const&am
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090108/a12fae2b/attachment.htm>


More information about the Insight-users mailing list