[Insight-users] ITK example problem

Luis Ibanez luis.ibanez at kitware.com
Wed Apr 25 17:25:33 EDT 2007


Hi 付文宇 :


It is unlikely that you can get the error:


  "fatal error C1083: Cannot open include file:
  'itksys/SystemTools.hxx': No such file or directory


when you are running an example.


You were probably just compiling the example.


What you are experiencing is the result of not
having created an appropriate  CMakeLists.txt
file for this example.


What you should do is the following:


1) copy the Image2.cxx example in a directory

2) Write a CMakeLists.txt file for it, by following
    the instructions in the Tutorial:
http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/img0.html

3) Run CMake, give that directory as the source directory

4) In the CMake variable ITK_DIR indicate the directory
    where you built ITK.

5) Build the directory.



Another approach is to build ALL the examples.
In that case, you simply rerun CMake in your original
ITK build, the open the project in Visual Studio, select
the BUILD_ALL target and build it. This will build all
the examples in a single compilation session.



In either case, please read the Tutorials:

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

in particular the first session.

They will save you a lot of time.




     Regards,


        Luis



-------------------
付文宇 wrote:
> Hi everyone:
>    I am learning ITK now. I follow the book "ITKSoftWare.pdf" to do an example in
> "...\InsightToolkit-3.2.0\Examples\DataRepresentation\Image\Image2.cxx". My os is
> windows xp professional and I use Microsoft vc++ 6 as my IDE. When I run this
> example an error of  "fatal error C1083: Cannot open include file:
> 'itksys/SystemTools.hxx': No such file or directory " takes place. I searched the
> file of "itksys/SystemTools.hxx" in  my computer and no such a file in my pc. When
> I build ITK using CMAKE I didn't choose EXAMPLE as "ON".Do it cause this problem?
> Or there is   other causes?
>   
>    Thanks in advance
>    Fu Wenyu
>    2007.04.26
> 
> 
> _______________________________________________
> 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