[Insight-users] Build error

Luis Ibanez luis.ibanez at kitware.com
Fri Jun 11 18:17:53 EDT 2004


Hi Jessica,

When you copy files out of the Examples subdirectories
you must modify the CMakeLists.txt file in order to
indicate CMake that it must look elsewhere for ITK.


This is very easy to do. Just add the following lines
to the CMakeLists.txt file



          FIND_PACKAGE(ITK)
          IF(ITK_FOUND)
              INCLUDE(${ITK_USE_FILE})
          ELSE(ITK_FOUND)
              MESSAGE(FATAL_ERROR
                    "Cannot build without ITK.  Please set ITK_DIR.")
          ENDIF(ITK_FOUND)



This is explained in detail in the SoftwareGuide

     http://www.itk.org/ItkSoftwareGuide.pdf

in the "Hello World" section 2.2.1, pdf-page 43.

It is also explained in the Tutorials:

    http://www.itk.org/HTML/Tutorials.htm

in particulat in the "GettingStarted-I" session

http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/index.htm


If you are a newcomer, please follow the recomendations
in the ITK Welcoming package:

      http://www.itk.org/HTML/Welcome.htm

This is intended to make your introduction to ITK much
more effective and pleasant.


Please let us know if you have further questions.


    Regards,



       Luis


--------------------
Jessica Ford wrote:

> Hi,
> 
> I'm a beginner trying to use ITK in Windows (Microsoft Visual C++). I am 
> following the ITK Software Guide and I have successfully run the 
> "HelloWorld" program. Now I'm trying to run the example program: 
> "ConnectedThresholdImageFilter.cxx" found in the directory 
> C:\crresear\InsightToolkit-1.6.0\Examples\Segmentation. I copy all the 
> files in this directory and put them into C:\crresear\Segmentation. One 
> of the files is "CannySegmentationLevelSetImageFilter.cxx   ". I run 
> CMake to generate the "ImageSegmentation.dsw" file. Then I open this 
> workspace file and try to build it. I have this error message:
> 
> Compiling...
> CannySegmentationLevelSetImageFilter.cxx
> C:\CRRESEAR\INSIGHTTOOLKIT-1.6.0\CODE\COMMON\itkVector.h(21) : fatal 
> error C1083: Cannot open include file: 'vnl/vnl_vector_ref.h': No such 
> file or directory
> Error executing cl.exe.
> 
> ALL_BUILD - 1 error(s), 0 warning(s)
> 
> 
> 
> Note:  I have already set the path of the "Include files" in Visual C++. 
> I set them to:
> C:\crresear\InsightToolkit-1.6.0\Code\Algorithms
> C:\crresear\InsightToolkit-1.6.0\Code\BasicFilters
> C:\crresear\InsightToolkit-1.6.0\Code\Common
> C:\crresear\InsightToolkit-1.6.0\Code\IO
> C:\crresear\InsightToolkit-1.6.0\Code\Numerics
> C:\crresear\InsightToolkit-1.6.0\Code\SpatialObject
> C:\crresear\Itk2 (this folder is the "binary directory" when running 
> CMake for ITK; I include this because the itkConfigure.h is created in 
> here)
> 
> Sincerely,
> Jessica
> 
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
> http://join.msn.com/?page=features/virus
> 
> _______________________________________________
> 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