[Insight-users] Linker Errors using ScalableAffineTransform
Luis Ibanez
luis.ibanez at kitware.com
Sun Aug 5 10:50:10 EDT 2007
Hi Matthias,
From the type:
vnl_svd<unsigned char>::
in the error message,
it looks like you are instantiating the ScalableAffineTransform
using "unsigned char" as the TScalarType.
maybe you are doing something like:
typedef itk::ScalableAffineTransform< unsigned char, 3 > TransformType
???
Is that the case ?
If so, then this is not a good idea,
You should use "float" or "double" as the scalar type for
instantiating Transform, since that is the type that will
be used for computing the coordinate transformations.
Please post to the list the "typedef" where you instantiate the
transform type.
Also, note that *YOU DON'T* need to specify such a long list
of Libraries.
CMake is aware of the dependencies between the libraries and
will bring the libraries that you need.
You will probably be fine by just linking against ITKIO and
ITKCommon.
If you are in Unix, the *order* of the libraries in the
link line is important, and by listing them all, you are
only risking to do it in the wrong order.
Regards,
Luis
---------------------------
Matthias Riechmann wrote:
> Hi,
>
> I'm trying to perform an image transformation using
> ScalableAffineTransform. But as soon as I instantiate an object of this
> class I get linker errors, complaining that two symbols are missing:
>
> ModelGenerator.obj : error LNK2019: unresolved external symbol "public:
> __thiscall vnl_svd<unsigned char>::vnl_svd<unsigned char>(class
> vnl_matrix<unsigned char> const &,double)"
> (??0?$vnl_svd at E@@QAE at ABV?$vnl_matrix at E@@N at Z) referenced in function
> "public: __thiscall vnl_matrix_inverse<unsigned
> char>::vnl_matrix_inverse<unsigned char>(class vnl_matrix<unsigned char>
> const &)" (??0?$vnl_matrix_inverse at E@@QAE at ABV?$vnl_matrix at E@@@Z)
>
> ModelGenerator.obj : error LNK2019: unresolved external symbol "public:
> class vnl_matrix<unsigned char> __thiscall vnl_svd<unsigned
> char>::pinverse(unsigned int)const "
> (?pinverse@?$vnl_svd at E@@QBE?AV?$vnl_matrix at E@@I at Z) referenced in
> function "public: class vnl_matrix<unsigned char> __thiscall
> vnl_svd<unsigned char>::inverse(void)const "
> (?inverse@?$vnl_svd at E@@QBE?AV?$vnl_matrix at E@@XZ)
>
> Is this a bug, or am I doing something wrong? I'm using Visual Studio
> 2005 and CMake 2.4 to build the project. The ITK-Version I'm using is
> 3.2.0. For linking against the ITK-Libraries I used both
> ${ITK_LIBRARIES} and a list of all separate libraries I could find:
>
> ITKAlgorithms
> ITKBasicFilters
> ITKCommon
> ITKDICOMParser
> ITKEXPAT
> ITKFEM
> itkgdcm
> ITKIO
> itkjpeg12
> itkjpeg16
> itkjpeg8
> ITKMetaIO
> ITKniftiio
> ITKNrrdIO
> ITKNumerics
> itkopenjpeg
> itkpng
> ITKQuadEdgeMesh
> ITKSpatialObject
> ITKStatistics
> itksys
> itkTestDriver
> itktestlib
> itktiff
> itkv3p_netlib
> itkvcl
> itkvnl
> itkvnl_algo
> itkvnl_inst
> itkzlib
> ITKznz
> vtkWriteDicom
>
> But both ways lead to the same result. Does anybody have a good idea to
> help me?
>
>
> Matthias
>
>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list