[insight-users]To Luis :the cmakelist.txt file

Luis Ibanez luis.ibanez at kitware.com
Sun Mar 26 11:37:37 EST 2006


Hi 方元元


Your description of your problem is a bit confusing.

The fact that you install ITK cannot be related to
your other VTK projects not working anymore.


It will be very useful is you explain better the problems
that you are having and if you separate them in well
identified pieces.

For example:


A) Can you build ITK, as explained in the Tutorial ?
   (it seems that you can...)


B) The CMakeLists.txt file that you posted looks fine
   for building the HelloWorld example.
   Did it worked for you ? can you build this example
   outside of the ITK source tree and run it ?


C) If you want to combine ITK and VTK in an application
   you *MUST* build both libraries with the *EXACT* same
   compilation options. You *CANNOT* build one for Release
   and the other one for Debug.

   You should NOT use the option "/NODEFAULTLIB".
   That doesn't solve the real problem, which is the
   fact that you are mixing compilation modes in
   your application.


D) There is a full Tutorial explaining how to combine
   ITK and VTK:

http://www.itk.org/CourseWare/Training/GettingStarted-II.pdf

   Did you read this Tutorial ?
   Did you follow the example in the Tutorial ?

   You should do this before attempting to combine
   ITK and VTK in your application.




You will avoid a lot of pain and frustration if you
solve problems progressively and in an ordered manner.



  Regards,



     Luis



--------------
方元元 wrote:
> Luis,
> Thank you very much!!
> Because I first use  VTK ,many projects use VTK .But after installing 
> ITK ,those project cannot work.So I have to combine VTK and ITK corretly.:(
>  
> I wrote the CMakeList.txt file as the "Getting Started I" said.  The 
> following is it:
> "
> PROJECT(myProject)
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
>      INCLUDE(${USE_ITK_FILE})
> ENDIF(ITK_FOUND)
> ADD_EXECUTABLE(myProject myProject.cxx)
> TARGET_LINK_LIBRARIES(myProject ITKCommon ITKIO)
> "
> Vivian
>  
>  
> 
> 
> 
> 
> 
> 
> 
> 你 知 道 2006 年 最 火 爆 的 电 子 邮 箱 吗 ?
> 多 达 1.1 亿 中 国 人 选 择 网 易 2000 兆 免 费 邮 箱 , 抢 注 再 得 280 
> 兆 超 大 网 盘 <http://www.126.com/help/126fab.htm>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list