[Insight-users] Re : No linkage between header and ITK library: itkImage.h not found in helloworld

Nora Nora nora_droit at yahoo.fr
Wed Nov 19 07:01:21 EST 2008


Hi Roel,
When compiling  a C++  file built by Cmake (as in Hollow World example), the linkage is done implicitly (CMakeLists.txt informs compiler that it must search ITK files and the property ITK_DIR indicate the path to those ITK  files).
But if project is built without Cmake(written in visual studio C++ for example), here the linkage must be done explicitly : open project in Visual studio C++ → project→ settings →……..(we add  paths of include repertory and lib repertory that exist in your case in d:\ITK\InsightBin\ ).
I have the same configuration as you (visual C++ express edition 2008 ) .  I have followed your steps and HelloWorld example has built and run successively with cmake and visual C++ express edition.
I seems that your problem is in d:\ITK\Insight\   and  the setting of the property ITK_DIR . I followed the same steps as you (as in GettingStarted-I available in ITK home) but no as directory was built , however  C_MAKE_INSTALL_PREFIX  was set by default to its path (d:\ITK\Insight) !!I had as directory in building VTK    where   the property ITK_DIR must be set  by the path of this directory.
I am searching why it exists in building VTK and there is not in building ITK!!
In  all cases, follow steps of GettingStarted-I  and verify the setting of ITK_DIR.  I am sure that will work with you.
Nora

--- En date de : Mer 19.11.08, Roel Kierkels <rkierkels at hotmail.com> a écrit :

De: Roel Kierkels <rkierkels at hotmail.com>
Objet: [Insight-users] No linkage between header and ITK library: itkImage.h not found in helloworld
À: insight-users at itk.org
Date: Mercredi 19 Novembre 2008, 3h11




#yiv1036397972 .hmmessage P
{
margin:0px;padding:0px;}
#yiv1036397972 {
font-size:10pt;font-family:Verdana;}

Hello,

I'm a new ITK user and installed the ITK Toolbox into a new directory d:\ITK\Insight\ following the ITKSoftwareguide.pdf. The version of the CMake is 2.6 -patch 2 and the version of the ITK is 3.10.
Then I build the ITK Toolbox successfully (with CMake and the microsoft visual studio 9.0 compiler) which created the InsightBin directory (d:\ITK\InsightBin\) in which the ITKConfig.cmake is located. 
Then I created a new directory "D:\ITK\Installation" and copied the CMakeLists.txt and HelloWorld.cxx file from the examples directory in it. Using CMake I compiled a microsoft visual solution file with the selected "microsoft visual studio 9.0" compiler and set the property ITK_DIR to d:\ITK\InsightBin\. Then I opened the project into microsoft visual studio and selected ALL_BUILD and Build --> Build solution. After a second the message: 

fatal error C1083: Cannot open include file: 'itkImage.h': No such file or directory    d:\ITK\Installation\HelloWorld.cxx    10    HelloWorld

When I copy the itkImage.h file inside the d:\ITK\Installation directory and compile it, again another *.h file is missing. So far as I understand is CMake for the creation of the project file and to link the ITK header files and the course *.cxx code and is it not nessecarily to copy all header files in the project directory. I cannot find in any help or on the internet how to solve this problem. Probably I make a beginners mistake, hopefully someone can help me to continuing using ITK! Thanks

Roel.





Access your email online and on the go with Windows Live Hotmail. Sign up today. _______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081119/71e5456d/attachment.htm>


More information about the Insight-users mailing list