[Insight-users] Using ITK with visual studio and not cmake

John Drescher drescherjm at gmail.com
Mon Oct 19 12:35:29 EDT 2009


> I want to incorporate more libraries than just itk in my project, and
> am having a pretty hard time of it.
>
I can tell you as a 12 year windows programmer before ever using
CMake, its much much easier to do this with cmake. And also cmake
actually a lot of benefit to visual studio. Out of source builds,
built in unit testing, built in install generator, ability to have one
project file for all versions of visual studio VC6+... Eventually I
will convert all my old projects to use cmake and drop the .vsproj and
.dsp files out of my cvs repository...

>
> I've built the libraries using the cmake options to build only libraries.
>
> I then have a basic hello-world executable that links to the built
> libraries and includes the itk/code/common directory.
>
> I then #include "itkImage.h" at the top of my main file, and have the
> body of the main function matching the example from HelloWorld.cxx in
> examples/installation
>
> When I try to build, I get this error:
>
> 1>c:\users\mark\src\itktests\itktestproject\itk
> libraries\code\common\itkwin32header.h(23) : fatal error C1083: Cannot
> open include file: 'itkConfigure.h': No such file or directory
>
> How do I fix this?  I can't find the itkConfigure.h file anywhere;
> does cmake not make it automatically?
>
Yes, that should be inside the build tree. I have my ITK source at

X:\CMakeBase\Libraries\ITK-3.16

and the build tree at

X:\32Bit\VC.80\Libraries\ITK-3.16

and I can see a itkConfigure.h in that folder.


John


More information about the Insight-users mailing list