Page MenuHomePhabricator

Step6 linker error with MITK_ACCESSBYITK_DIMENSIONS=2,3,4
Closed, ResolvedPublic

Description

Hi,

I changed the MITK_ACCESSBYITK_DIMENSIONS CMake option to have conversion functions for 4D images. After rebuilding MITK I get the error below.

Otherwise, the 4D conversions functions are now generated well, and I can use them in my app without problem. I will disable building the tutorial.

Miklos


Linking CXX executable ../../bin/Step6
CMakeFiles/Step6.dir/Step6.cpp.o: In function `Step6::StartRegionGrowing()':
Step6.cpp:(.text+0x19c9): undefined reference to `void RegionGrowing<int, 4u>(itk::Image<int, 4u>*, Step6*)'
Step6.cpp:(.text+0x1c50): undefined reference to `void RegionGrowing<unsigned int, 4u>(itk::Image<unsigned int, 4u>*, Step6*)'
Step6.cpp:(.text+0x20ff): undefined reference to `void RegionGrowing<short, 4u>(itk::Image<short, 4u>*, Step6*)'
Step6.cpp:(.text+0x22b7): undefined reference to `void RegionGrowing<unsigned short, 4u>(itk::Image<unsigned short, 4u>*, Step6*)'
Step6.cpp:(.text+0x2735): undefined reference to `void RegionGrowing<double, 4u>(itk::Image<double, 4u>*, Step6*)'
Step6.cpp:(.text+0x2966): undefined reference to `void RegionGrowing<unsigned char, 4u>(itk::Image<unsigned char, 4u>*, Step6*)'
Step6.cpp:(.text+0x2b97): undefined reference to `void RegionGrowing<char, 4u>(itk::Image<char, 4u>*, Step6*)'
Step6.cpp:(.text+0x2cbd): undefined reference to `void RegionGrowing<float, 4u>(itk::Image<float, 4u>*, Step6*)'
collect2: ld returned 1 exit status
make[5]: * [bin/Step6] Error 1
make[4]:
* [Applications/Tutorial/CMakeFiles/Step6.dir/all] Error 2
make[3]: * [all] Error 2
make[2]:
* [CMakeFiles/MITK-build] Error 2
make[1]: * [CMakeFiles/MITK-build.dir/all] Error 2
make:
* [all] Error 2

Event Timeline

[f11754]: Merge branch 'bug-10324-add-4d-support-to-step6'

Merged commits:

2013-06-24 23:00:36 Sascha Zelzer [441cf1]
Added 4d instantiations of the region growing template.

The instantiation macro could handle all configured dimensions at once, but some compilers seem to have memory problems with that amount of generated template code.

So the fix is a work-around which enables the general use cases: 2d, 3d and 4d.