[Insight-developers] Nonunit module dependency
Matt McCormick
matt.mccormick at kitware.com
Mon Jul 18 17:29:39 EDT 2011
Hi David,
This should not be a problem anymore after we get the MRCImageIO out of
Nonunit/Review.
Thanks,
Matt
On Mon, Jul 18, 2011 at 5:21 PM, David Doria <daviddoria at gmail.com> wrote:
> When trying to build some very simple code (below) that simply creates and
> image and writes it with an ImageFileWriter, I get:
>
> CMakeFiles/ImageFunctionImageFilter.dir/ImageFunctionImageFilter.cxx.o:(.data+0x50):
> undefined reference to `itk::MRCImageIOFactoryRegister__Private()'
> collect2: ld returned 1 exit status
>
> I had built ITK with ITKGroup_Core and ITKGroup_IO ON. Once I turned
> on ITKGroup_Nonunit, my code built fine.
>
> 1) Is there a reason for this dependency?
>
> 2) If so, could there be a better way to identify that a module is missing?
> The link from the error "MRCImageIOFactoryRegister__Private" to the solution
> of "turn on ITKGroup_Nonunit" is non-obvious.
>
> David
>
> (This is the code I used to test this:)
>
> #include "itkImage.h"
> #include "itkImageFileWriter.h"
>
> typedef itk::Image< unsigned char, 2 > UnsignedCharImageType;
>
> int main(int, char* [] )
> {
> UnsignedCharImageType::Pointer image = UnsignedCharImageType::New();
>
> typedef itk::ImageFileWriter< UnsignedCharImageType > WriterType;
> WriterType::Pointer writer = WriterType::New();
> writer->SetFileName("ImageFunctionImageFilter.mhd");
> writer->SetInput(image);
> writer->Update();
>
> return 0;
> }
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110718/56fb2f1b/attachment.htm>
More information about the Insight-developers
mailing list