[Insight-developers] example failing with fresh source tree

Brad King brad.king at kitware.com
Fri Apr 15 11:03:42 EDT 2011


On 04/15/2011 05:52 AM, Alexandre GOUAILLARD wrote:
> I m getting this strange error, any idea?
> 
> Linking CXX executable ../../bin/ImageLinearIteratorWithIndex
> Undefined symbols:
>   "itk::MRCImageIOFactoryRegister__Private()", referenced from:
>       itk::(anonymous namespace)::ImageIOFactoryRegisterRegisterListin
> ImageLinearIteratorWithIndex.cxx.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make[2]: *** [bin/ImageLinearIteratorWithIndex] Error 1
> make[1]: *** [Examples/Iterators/CMakeFiles/ImageLinearIteratorWithIndex.dir/all]
> Error 2
> make: *** [all] Error 2

The error will probably go away if you turn on ITK_BUILD_ALL_MODULES.
It seems the Examples tree has an implicit dependency on some/many/most
of the modules.  We have two options to make sure this works out of
the box:

(1) Require ITK_BUILD_ALL_MODULES if BUILD_EXAMPLES is ON.
(2) Condition the build of each example on the modules it needs.

-Brad


More information about the Insight-developers mailing list