[Insight-users] watershed example does not compile

Luis Ibanez luis.ibanez@kitware.com
Wed, 10 Apr 2002 11:43:50 -0400


Hi Paul,

The first set of error is complaining about
not finding :  itkConfigure.h

This file is generated by CMake during the
configuration process and is placed on the
ITK Binary directory that you indicated to
CMake.

You can make reference to this path inside the
CMakeLists.txt files by using:  ${ITK_BINARY_DIR}

You may fix this by adding the following to
the CMakeLists.txt file in the WatershedSegmentation
directory, in:

INCLUDE_DIRECTORIES(
...
${ITK_SOURCE_DIR}/Code/Common
${ITK_SOURCE_DIR}/Code/IO
...
${ITK_BINARY_DIR}   <---  add this one
...
)


But...   You should not need to do that !


The CMakeLists.txt follow the tree like structure
of the directories. So when you got to the Watershed
example, all the definitions done in the upper
directories should be available to this one.

Something should be confusing your configuration...

Could you please describe in more detail how
are you running cmake ?

and also,

what version of ITK you are using ? is that from the
CVS repository or form the Beta tarball.



One of the easiest way of configuring on Unix
is to first create the directory where you want
ITK to be built (the binary directory) then
cd into that directory and then run "ccmake"
(the curses interface to cmake) giving the
ITK source directory as parameter. For example,
let's say that ITK is in /home/paul/src/Insight

you may do:

cd /home/paul/src
mkdir InsightBin
cd InsightBin
ccmake ../Insight

then fill in all the information that cmake
requires for the configuration and finally
generate the makefiles. Once cmake quits,
you should only need to invoke : "make"
for getting everything built, including the
examples.

In principle it should not be necessary
to modify the CMakeLists.txt files. This
example is being build nightly in most
of the platforms using the current
CMakeLists.txt file.




    Luis



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

Paul Berube wrote:
> OK, so here is the new error output:
> 
> [berube@horse-rv WatershedSegmentation]$ make
> c++ -g -O2
> -I/compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation
> -I/compsci/robb/ugrad/berube/Insight/Code/Common
> -I/compsci/robb/ugrad/berube/Insight/Code/IO
> -I/compsci/robb/ugrad/berube/Insight/Code/BasicFilters
> -I/compsci/robb/ugrad/berube/Insight/Code/Algorithms
> -I/compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentationExample
> -c
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx
> -o itkWatershedSegmentationExample.o
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkLightObject.h:20,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkObject.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkProcessObject.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImageSource.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImageToImageFilter.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:20,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMacro.h:34:26:
> itkConfigure.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImageSource.h:232,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImageToImageFilter.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:20,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImageSource.txx:24:26:
> vnl/vnl_math.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkPoint.h:20,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkVector.h:21:32:
> vnl/vnl_vector_ref.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkVector.txx:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkVector.h:182,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkPoint.h:20,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkNumericTraits.h:28:36:
> vnl/vnl_numeric_limits.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkVector.h:182,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkPoint.h:20,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkVector.txx:22:26:
> vnl/vnl_math.h: No such file or directory
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkVector.txx:26:30:
> vnl/vnl_vector.txx: No such file or directory
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkVector.txx:27:36:
> vnl/vnl_vector_fixed.txx: No such file or directory
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkVector.txx:28:32:
> vnl/vnl_c_vector.txx: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkPoint.h:21:32:
> vnl/vnl_vector_ref.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkPoint.h:255,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkPoint.txx:20:26:
> vnl/vnl_math.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkCovariantVector.h:22:32:
> vnl/vnl_vector_ref.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkCovariantVector.h:167,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkCovariantVector.txx:21:26:
> vnl/vnl_math.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.h:24:34:
> vnl/vnl_matrix_fixed.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.h:134,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.txx:22:41:
> vnl/algo/vnl_matrix_inverse.h: No such file or directory
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.txx:23:31:
> vnl/vnl_transpose.h: No such file or directory
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkMatrix.txx:24:30:
> vnl/vnl_matrix.txx: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:24,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkTransform.h:24:34:
> vnl/vnl_vector_fixed.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.h:401,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkImage.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:21,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkAffineTransform.txx:22:41:
> vnl/algo/vnl_matrix_inverse.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itk_hash_map.h:57,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedSegmenter.h:20,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:22,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itk_hashtable.h:80:26:
> vcl_compiler.h: No such file or directory
> In file included from
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkNeighborhoodAlgorithm.h:23,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedSegmenter.txx:20,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedSegmenter.h:369,
>                  from
> /compsci/robb/ugrad/berube/Insight/Code/Algorithms/itkWatershedImageFilter.h:22,
>                  from
> /compsci/robb/ugrad/berube/Insight/Examples/WatershedSegmentation/itkWatershedSegmentationExample.cxx:17:
> /compsci/robb/ugrad/berube/Insight/Code/Common/itkNeighborhood.h:25:28:
> vnl/vnl_vector.h: No such file or directory
> make[1]: *** [itkWatershedSegmentationExample.o] Error 1
> make: *** [default_target] Error 2
> 
> 
> 
> 
> 
> 
>