<div class="gmail_quote">On Sun, Jun 10, 2012 at 10:10 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 was following these instructions by Luis Ibanez:<br>
<br>
"Hi Sebastian,<br>
Yes, it is very easy to create a static library.<br>
Simply write the following commands in the CMakeLists.txt<br>
file of your project:<br>
ADD_LIBRARY( MyLibraryName STATIC<br>
sourcefile1.cxx<br>
sourcefile2.cxx<br>
sourcefile3.cxx<br>
<div class="im"> )<br>
TARGET_LINK_LIBRARIES( MyLibraryName ITKCommon )<br>
</div>The "STATIC" modifier is not really necessary, since it is<br>
the default option anyways."<br>
<br>
I tried this :<br>
<div class="im">TARGET_LINK_LIBRARIES( MyLibraryName ${ITK_LIBRARIES} )<br>
<br>
</div>instead of this:<br>
TARGET_LINK_LIBRARIES( MyLibraryName ITKCommon )<br>
<br>
I still get the error : 'itkImage.h': No such file or directory<br>
<br>
Thanks<br>
<br>
Pratik<br></blockquote><div><br></div><div>Those must be very old instructions. If you are using ITK4, you should always link to ${ITK_LIBRARIES} .</div><div><br></div><div>You should not set this manually in the CMakeLists.txt:</div>
SET (ITK_DIR F:\ITK_jun1\bin)</div><div class="gmail_quote"><br></div><div class="gmail_quote">but rather set it using the CMake GUI when you generate your program. <br clear="all"><br>This is the important line for setting up the include path: include(${ITK_USE_FILE}), so since you have it, I'm not sure what else is wrong. Try setting your ITK_DIR in the cmake gui and regenerating your project.</div>
<div class="gmail_quote"><br>David</div>