[Insight-users] problem in debugging ITK

Luis Ibanez luis.ibanez at kitware.com
Sat May 21 13:46:54 EDT 2011


Hi John,

If you definitely can't use CMake to configure your project,
then the best next thing to do is the following:

1) Write a minimal example that uses ITK,
     as described in the Tutorial:
     http://www.itk.org/ITK/help/tutorials.html
     more specifically at:
     http://www.itk.org/CourseWare/Training/GettingStarted-I.pdf

     the key part is to write a CMakeLists.txt file
     that has

       FIND_PACKAGE(ITK  REQUIRED)
       INCLUDE(${ITK_USE_FILE})

2) Use CMake to generate the Visual Studio solution
    file for that minimal project

3) Open this minimal project with Visual Studio,
    and COPY the header settings and library
    settings from it into your own project that
    doesn't use CMake. (That will mostly be done
    by copy/pasting through the clipboard).


In this way, you still benefit from CMake finding
all the right settings for ITK, without you having
to discover them manually one by one.


     Luis


--------------------------------------------------------
On Fri, May 20, 2011 at 8:05 AM, john smith <mkitkinsightuser at gmail.com> wrote:
> Hello,
>
> I am using windows 7 and visual studio 2010, and so far I had being using
> Cmake to run my ITK's projects. But now I am trying to find the ITK's
> headers file (.h) from visual studio 2010. I have srarted to include my
> basic header files (for example smthing like these files "ITKImage.h" and
> "ITKImageFileReader.h"), but every time I was debugging my code, I found a
> new bug error. This error had to do with .h files declarartion (for example
> there wasn't any  source file "'vnl/vnl_config.h", and I should put in its
> place the "vnl_config.h" ). I corrected many of this bugs but I didn't
> manage to finally correct all the source coe, because I think all of these
> changes destroyed my source code.
>
> I would like to know what is the reason of using Cmake to run the ITK code?
> Has it to do with this problem that I had faced?
>
> Thanks
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list