Hi All,<br>
<br>
I am writing&nbsp; a multifile&nbsp; application using itk. The
individual classes and files are sound syntaxically but there is a
linking error which occurs after compiling individual files as shown
below. I think the error lies in the Makefile that I am using. As I
have not seen any example of Makefile, in ITK Examples or anywhere
else,&nbsp; which uses multiple files for creating an ITK application,
I was wondering if anyone else is facing the same problem or if anyone
has a solution to that. I hope to get a reply which solves my problems.<br>
<br>
With Best Regards<br>
<br>
Amitesh<br>
<br>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>[amitesh@mephisto gui]$ make
<br>
g++ imageprocessing.cpp<br>
g++ OpenFile.cpp<br>
g++ IntensityManip.cpp<br>
Linking imageprocessing...<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadItEvPiPdS1_Ss+0x7f2):
In function `vo id ParameterfileRead&lt;unsigned short&gt;(int*,
double*, double*, std::basic_string&lt;char, std::ch
ar_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;)':<br>
/home/amitesh/work/gui/imageprocessing.cpp:279: undefined reference to
`IntensityManipClass&lt; unsigned short&gt;::IntensityManipClass()'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadItEvPiPdS1_Ss+0x857):
In function `vo id ParameterfileRead&lt;unsigned short&gt;(int*,
double*, double*, std::basic_string&lt;char, std::ch
ar_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;)':<br>
/home/amitesh/.local/include/InsightToolkit/Common/itkSmartPointer.h:143:
undefined referenc e to `IntensityManipClass&lt;unsigned
short&gt;::RescaleFilterClass(unsigned short, unsigned short ,
itk::SmartPointer&lt;itk::Image&lt;unsigned short, 3u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadItEvPiPdS1_Ss+0x8d7):/home/amitesh/.l
ocal/include/InsightToolkit/Common/itkSmartPointer.h:143: undefined
reference to `IntensityM anipClass&lt;unsigned
short&gt;::ShiftFilterClass(unsigned short, double,
itk::SmartPointer&lt;itk::I mage&lt;unsigned short, 3u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadItEvPiPdS1_Ss+0x935):/home/amitesh/.l
ocal/include/InsightToolkit/Common/itkSmartPointer.h:143: undefined
reference to `IntensityM anipClass&lt;unsigned
short&gt;::NormalizeFilterClass(itk::SmartPointer&lt;itk::Image&lt;unsigned
short,&nbsp; 3u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadItEvPiPdS1_Ss+0x993):/home/amitesh/.l
ocal/include/InsightToolkit/Common/itkSmartPointer.h:143: undefined
reference to `IntensityM anipClass&lt;unsigned
short&gt;::NegativeFilterClass(itk::SmartPointer&lt;itk::Image&lt;unsigned
short, 3u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIfEvPiPdS1_Ss+0x7f7):
In function `vo id ParameterfileRead&lt;float&gt;(int*, double*,
double*, std::basic_string&lt;char, std::char_traits &lt;char&gt;,
std::allocator&lt;char&gt; &gt;)':<br>
/home/amitesh/work/gui/imageprocessing.cpp:279: undefined reference to
`IntensityManipClass&lt; float&gt;::IntensityManipClass()'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIfEvPiPdS1_Ss+0x85e):
In function `vo id ParameterfileRead&lt;float&gt;(int*, double*,
double*, std::basic_string&lt;char, std::char_traits &lt;char&gt;,
std::allocator&lt;char&gt; &gt;)':<br>
/home/amitesh/.local/include/InsightToolkit/Common/itkSmartPointer.h:143:
undefined referenc e to
`IntensityManipClass&lt;float&gt;::RescaleFilterClass(float, float,
itk::SmartPointer&lt;itk::Im age&lt;float, 3u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIfEvPiPdS1_Ss+0x8e2):/home/amitesh/.l
ocal/include/InsightToolkit/Common/itkSmartPointer.h:143: undefined
reference to `IntensityM
anipClass&lt;float&gt;::ShiftFilterClass(float, double,
itk::SmartPointer&lt;itk::Image&lt;float, 3u&gt; &gt;) '<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIfEvPiPdS1_Ss+0x940):/home/amitesh/.l
ocal/include/InsightToolkit/Common/itkSmartPointer.h:143: undefined
reference to `IntensityM
anipClass&lt;float&gt;::NormalizeFilterClass(itk::SmartPointer&lt;itk::Image&lt;float,
3u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIfEvPiPdS1_Ss+0x99e):/home/amitesh/.l
ocal/include/InsightToolkit/Common/itkSmartPointer.h:143: undefined
reference to `IntensityM
anipClass&lt;float&gt;::NegativeFilterClass(itk::SmartPointer&lt;itk::Image&lt;float,
3u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIhEvPiPdS1_Ss+0x7f2):
In function `vo id ParameterfileRead&lt;unsigned char&gt;(int*,
double*, double*, std::basic_string&lt;char, std::cha
r_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;)':<br>
/home/amitesh/work/gui/imageprocessing.cpp:279: undefined reference to
`IntensityManipClass&lt; unsigned char&gt;::IntensityManipClass()'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIhEvPiPdS1_Ss+0x857):
In function `vo id ParameterfileRead&lt;unsigned char&gt;(int*,
double*, double*, std::basic_string&lt;char, std::cha
r_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;)':<br>
/home/amitesh/.local/include/InsightToolkit/Common/itkSmartPointer.h:143:
undefined referenc e to `IntensityManipClass&lt;unsigned
char&gt;::RescaleFilterClass(unsigned char, unsigned char, i
tk::SmartPointer&lt;itk::Image&lt;unsigned char, 3u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIhEvPiPdS1_Ss+0x8d7):/home/amitesh/.l
ocal/include/InsightToolkit/Common/itkSmartPointer.h:143: undefined
reference to `IntensityM anipClass&lt;unsigned
char&gt;::ShiftFilterClass(unsigned char, double,
itk::SmartPointer&lt;itk::Ima ge&lt;unsigned char, 3u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIhEvPiPdS1_Ss+0x935):/home/amitesh/.l
ocal/include/InsightToolkit/Common/itkSmartPointer.h:143: undefined
reference to `IntensityM anipClass&lt;unsigned
char&gt;::NormalizeFilterClass(itk::SmartPointer&lt;itk::Image&lt;unsigned
char, 3 u&gt; &gt;)'<br>
imageprocessing.o(.gnu.linkonce.t._Z17ParameterfileReadIhEvPiPdS1_Ss+0x993):/home/amitesh/.l
ocal/include/InsightToolkit/Common/itkSmartPointer.h:143: undefined
reference to `IntensityM anipClass&lt;unsigned
char&gt;::NegativeFilterClass(itk::SmartPointer&lt;itk::Image&lt;unsigned
char, 3u &gt; &gt;)'<br>
collect2: ld returned 1 exit status<br>
make: *** [imageprocessing] Error 1<br>
<br>