[ITK] [ITK-users] Strange Visual Studio 2012 problem

Girish Mallya Udupi indianzeppelin at gmail.com
Fri Aug 29 06:35:44 EDT 2014


Ok, I've never actually built the "INSTALL" project and the oldest ITK
version I have used is ITK-4.5.1. The folders you see ('CMakeFiles' etc)
look normal to me since those are present in the build folder. Anyway, it
might be worth trying to build ITK again using the following simple steps.
(You might be aware of all the steps, but mentioning them all here just for
the sake of completeness).

1) Create a root folder e.g., D:\ITK-4.5
2) Create two folders in the root folder "src" and "bin"
3) Put the ITK source tree in the src folder. So this folder would have the
main ITK CMakeLists.txt.
4) Configure and generate using CMake with "D:\ITK-4.5\src" as source
folder and "D:\ITK-4.5\bin" as binary directory
5) Then open the ITK.sln from "D:\ITK-4.5\bin" and build the solution.
6) Once built, edit the ITK environment variable ITK_DIR  to point to "
D:\ITK-4.5\bin"

I've never faced any problem using ITK in my projects after building it
this way. I am still a beginner, so someone more knowledgeable could point
out what exactly the problem was with your build.



On Fri, Aug 29, 2014 at 11:16 AM, Gib Bogle <g.bogle at auckland.ac.nz> wrote:

>  I just checked the build configuration in cmake and everything looks
> fine.
>  ------------------------------
> *From:* Girish Mallya Udupi [indianzeppelin at gmail.com]
> *Sent:* Friday, 29 August 2014 9:29 p.m.
>
> *To:* Gib Bogle
> *Cc:* insight-users at itk.org
> *Subject:* Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem
>
>   That looks alright. Did you try MESSAGE (${ITK_USE_FILE}) and MESSAGE
> (${ITK_INCLUDE_DIRS})?
>
>
> On Fri, Aug 29, 2014 at 10:10 AM, Gib Bogle <g.bogle at auckland.ac.nz>
> wrote:
>
>>  I just remembered that I forgot to paste that:
>>
>>
>> cmake_minimum_required(VERSION 2.6)
>>
>> PROJECT(crop)
>> FIND_PACKAGE(ITK)
>> IF(ITK_FOUND)
>> INCLUDE(${ITK_USE_FILE})
>> ELSE(ITK_FOUND)
>> MESSAGE(FATAL_ERROR
>> "ITK not found. Please set ITK_DIR.")
>> ENDIF(ITK_FOUND)
>>
>> set(PROJECTNAME "crop")
>> ADD_EXECUTABLE(${PROJECTNAME} crop.cpp)
>> TARGET_LINK_LIBRARIES(${PROJECTNAME} ${ITK_LIBRARIES} )
>>   ------------------------------
>> *From:* Girish Mallya Udupi [indianzeppelin at gmail.com]
>> *Sent:* Friday, 29 August 2014 8:25 p.m.
>> *To:* Gib Bogle
>> *Cc:* insight-users at itk.org
>> *Subject:* Re: [ITK] [ITK-users] Strange Visual Studio 2012 problem
>>
>>    Could you paste the part of your CMakeLists.txt where you
>> find/include ITK?
>>
>>
>> On Fri, Aug 29, 2014 at 9:09 AM, Gib Bogle <g.bogle at auckland.ac.nz>
>> wrote:
>>
>>>  I've been using Visual Studio 10 for a few years without any
>>> problems.  Now I have a new machine with Visual Studio 11 (i.e. 2012)
>>> installed.  I have built ITK 64-bit, and installed it in D:\ITK-VS11-x64.
>>> The ITK environment variable ITK_DIR = D:\ITK-VS11-x64.  When I try to
>>> build my programs with the new libraries the build fails with (for example)
>>> this message:
>>>
>>> crop.cpp(18): fatal error C1083: Cannot open include file: 'itkImage.h':
>>> No such file or directory
>>>
>>> Looking at the Project Properties I see in Additional Include
>>> Directories: crop.cpp(18): \include\ITK-4.5
>>> For some reason cmake has not used the ITK_DIR prefix.  In addition I
>>> see in Linker > Additional Dependencies that all the ITK libraries are
>>> expected to be in D:\ITK-VS11-x64\lib\Release\ - another nonexistent
>>> directory, although in this case the ITK_DIR prefix has been used.
>>>
>>> This is a bit of a mess.  I presume the problem lies with cmake.  My
>>> version is 2.8.12.2, which I would have thought was recent enough - maybe
>>> it's too recent.  Has anyone else run into this problem, and is there a
>>> solution?
>>>
>>> Thanks
>>> Gib
>>>
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.php
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/insight-users
>>>
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/mailman/listinfo/community
>>>
>>>
>>
>>
>>  --
>> Regards,
>> Girish
>>
>
>
>
>  --
> Regards,
> Girish
>



-- 
Regards,
Girish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140829/d6e4cebe/attachment-0002.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list