<div class="gmail_quote">On Sun, Jun 10, 2012 at 11:08 AM, Pratik Talole <span dir="ltr"><<a href="mailto:pratiktalole@gmail.com" target="_blank">pratiktalole@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
David,<br>
<br>
I printed out my environment during build. The build log shows that ITK_DIR<br>
is indeed set correctly to "ITK_DIR = F:\ITK_jun1\bin"<br>
<br>
Could the problem then not be with ITK_DIR?<br>
<br>
This is what I did :<br>
<br>
I first created a HelloWorld project using the CMakeLists file (keeping<br>
$(ITK_LIBRARIES)). This created two projects, an executable and a lib<br>
sharing the same source files. I added my ITK code to the source files here.<br>
I ran the executable, and built the lib. It was successful.<br>
<br>
Then I created a new console application, and added the previously built lib<br>
in the solution and references.<br>
I added the path of source files in my HelloWorld ITK project to additional<br>
include directories of this project.<br>
<br>
But as soon as I tried to include any header files of the ITK lib project<br>
into the source files of this project, I started getting errors telling me<br>
the various ITK Headers it could not find.<br>
<br>
What I am really trying is this :<br>
I have a function, that performs deconvolution in ITK. It takes two vectors<br>
as inputs and returns a vector as output. I added this function to a header<br>
file. It works as an executable and builds to a lib, but since I need to use<br>
the code in another project, I am facing the problems I mentioned above.<br>
<br>
Can you please point me in the direction, as how can I import a ITK function<br>
into my existing Visual Studio project?<br></blockquote><div><br></div>That explains it. You can't just setup a Visual Studio project manually - you need to create the Visual Studio project using CMake. When you run CMake, it gives you the option of which "generator" you want to use. This setups up all the ITK paths for you, so you won't experience problems like you are seeing.<br clear="all">
<br>David<br><div> </div></div>