[Insight-users] testing problem with itkhistogrammatchingimagefilter

Luis Ibanez luis . ibanez at kitware . com
Wed, 04 Sep 2002 09:52:29 -0400


Hi digvijay,


Instead of:

 > SOURCE_FILES(itkHistogramMatchingImageFilterTest_SRCS
 > itkHistogramMatchingImageFilterTest.cxx
 > )
 >
 > SOURCE_FILES(main_SRCS
 > main.cxx
 > )
 >

You can just do:

SOURCE_FILES(itkHistogramMatchingImageFilterTest_SRCS
   itkHistogramMatchingImageFilterTest.cxx
   main.cxx
)

and leave only:

ADD_EXECUTABLE(itkHistogramMatchingImageFilterTest
                  itkHistogramMatchingImageFilterTest_SRCS)


It is normal for the compiler to complain if you use
itkHistogramMatchingImageFilterTest(...) function inside
the main.cxx file.  Just add the declaration of the function's
signature to the top of the main.cxx file.

Something like:

   int itkHistogramMatchingImageFilterTest(int, char **);

   int main(int argc, char **argv)
   {
     itkHistogramMatchingImageFilterTest( argc, argv );
     return 0;
   }


Please let us know if that works for you,

Thanks,

   Luis


=======================================

digvijay singh wrote:
> 
> I tried it with main_SRCS included in ADDExecutable
> for the example and i got the following error message:
> 
> /home/vertebra/digvijay/itk/proj_1/MRIBiasCorrection/test/main.cxx:
> In function
> `int main(int, char **)':
> /home/vertebra/digvijay/itk/proj_1/MRIBiasCorrection/test/main.cxx:3:
> implicit d
> eclaration of function `int
> itkHistogramMatchingImageFilterTest(...)'
> make[1]: *** [main.o] Error 1
> make: *** [default_target] Error 2
> 
> 
> collect2: ld returned 1 exit status
> make[1]: *** [itkHistogramMatchingImageFilterTest]
> Error 1
> make: *** [default_target] Error 2
> 
> 
> 
>