[Insight-users] Problem trying to use static libs instead of dynamic

Daniel Betz dbetz at stud.hs-bremen.de
Fri Oct 17 17:58:11 EDT 2008


> Good evening everyone,
Hi Maximilien Renard.
>
> I'm having troubles trying to use the static libs of ITK instead of
> the dynamic ones.
>
> When compiling with the dynamic libs, everything works fine but as
> soon as I change them for the static ones I'm getting these errors :
>
> /usr/lib/libITKIO.a(itkGDCMImageIO.o):(.rodata._ZTVN3itk11GDCMImageIOE[vtab
>le for itk::GDCMImageIO]+0x60): undefined reference to
> `itk::LightProcessObject::UpdateOutputData()'
...
> /usr/lib/libITKIO.a(itkGiplImageIO.o):(.rodata._ZTVN3itk11GiplImageIOE[vtab
>le for itk::GiplImageIO]+0x60): undefined reference to
> `itk::LightProcessObject::UpdateOutputData()'
> collect2: ld returned 1 exit status
> make: *** [project] Error 1
> *** Exited with status: 2 ***
>
> Has someone an idea of what I'm supposed to do to fix that ? I'm
> getting nuts because I've been trying to get this working for one hour
> now :p
What did you try ? Check your CMakeLists.txt (I guess you use cmake?)
If you add all needed packages to TARGET_LINK_LIBRARIES the linker should
find the needed libraries. e.g.

TARGET_LINK_LIBRARIES(nrrdVectorImageReaderTest ITKCommon ITKIO)

Take a look in
Insight/Examples/Installation/CMakeLists.txt

In your case I would say you need to add ITKIO to TARGET_LINK_LIBRARIES.

>
> Any help would be very appreciated.
>
> Best regards,
>
> Maximilien Renard

Regards
Daniel Betz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081017/9d245c2f/attachment-0001.pgp>


More information about the Insight-users mailing list