[Insight-users] Help on link error with a template function 
    Sam 
    sd2usa at gmail.com
       
    Wed Dec 20 11:12:58 EST 2006
    
    
  
Dear ITK developers and users;
 
I defined a template function:
 
template<class InputArrayType, class OutputArrayType> 
void myPyramid(itk::Array2D< InputArrayType > in, itk::Array2D<
OutputArrayType > out, unsigned int nColumns, unsigned int nRows) ;
 
and used it in the main file:
 
       typedef signed short InputPixelType;
 
typedef       itk::Array2D< InputPixelType > InputArray2D ;
       InputArray2D  inputImageArray2D( lWidth, lHeight ) ;
 
       typedef       itk::Array2D< float > FloatArray2D ;
       FloatArray2D  outputImageArray2D( lWidth/2, lHeight/2 ) ;
 
       myPyramid( inputImageArray2D, outputImageArray2D, (unsigned
int)lWidth, (unsigned int)lHeight ) ;
 
but a link error displays:
 
DicomImageReadWrite.obj : error LNK2019: unresolved external symbol "void
__cdecl myPyramid(class itk::Array2D<short>,class
itk::Array2D<float>,unsigned int,unsigned int)"
(?myPyramid@@YAXV?$Array2D at F@itk@@V?$Array2D at M@2 at II@Z) referenced in
function _main
 
Debug\DicomImageReadWrite.exe : fatal error LNK1120: 1 unresolved externals
 
Would you please help me to find where the problem is and how to fix it?
Your kind help is greatly appreciated.
 
Best regards,
Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20061220/f51dd993/attachment.html
    
    
More information about the Insight-users
mailing list