[Insight-users] linking errors

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Nov 4 14:53:08 EST 2009


On Wed, Nov 4, 2009 at 7:21 PM, Mark Roden <mmroden at gmail.com> wrote:
> Hi Mathieu,
>
> These problems appear when I use the release build of itk, but not the
> debug build, so I can't provide any further information.

You cannot mix release and debug builds, this has never work and will
never work on any Win32+M$ compiler. I even thought cmake 2.6 was very
picky about that, and would not let you shoot yourslef in the foot...

> With the debug build, it takes roughly a minute to read a stack of 120
> images into a single volume, so I can use it, but I'd rather have the
> bug fixed.  Or, alternatively, a fix to my original code to use gdcm
> 2.1 instead of the 1.2 that comes with itk.  I'm planning on
> incorporating the rt struct reader code as well, and that's definitely
> using the later gdcm version.  While I could do this all as separate
> programs, that will make the logic of what I'm trying to do (register
> images to one another) more complicated than I think it needs to be.

You may want to create a fake cmakelists.txt, eg:

$ cat CMakeLists.txt
add_subdirectory(GDCM)
# setup ITK_USE_SYSTEM_GDCM
add_subdirectory(ITK)

To make sure you are building GDCM + ITK using the exact same compiler flags.

Good luck !
-- 
Mathieu


More information about the Insight-users mailing list