[Insight-users] Examples error in VC++

Luis Ibanez luis.ibanez@kitware.com
Tue, 08 Apr 2003 16:23:40 -0400


Hi Helder,

The VTK_USE_ANSI_STDLIB flag must
be set ON when you run CMake for
configuring VTK.

Please rerun CMake on you VTK build,
make sure to set ansi flag ON, and
then rebuild your VTK.

Once VTK is rebuilt, reconfigure
InsightApplications with CMake,
and rebuild the applications.

That should take care of the problem,


Regards,


    Luis


------------------------


Helder Carvalho wrote:
> hi luis,
> 
> I've changed my CMakeLists from this:
> 
> SUBDIRS(
>  DataRepresentation
>  Filtering
>  IO
>  Registration
>  Segmentation
> )
> to this:
> # Find ITK.
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
>  INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
>  MESSAGE(FATAL_ERROR
>          "Cannot build without ITK.  Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
> 
> SUBDIRS(
>  DataRepresentation
>  Filtering
>  IO
>  Registration
>  Segmentation
> )
> 
> And it worked fine. Thanks.
> 
> During the process of Cmake creation of ITKApplications there's a pop up 
> warning telling this:
> ""Warning.  Your VTK was not built with the VTK_USE_ANSI_STDLIB "
> "option ON.  Link errors may occur.  Consider re-building VTK "
> "with this option ON.  For MSVC 6, you MUST turn on the VTK "
> "option.  ITK will not link otherwise."
> I've changed my CMakeList and put the option On but the pop up still 
> appears.Was this the right thing to do?
> On the vtk CMakeList there were this lines:
> 
> #----------------------------------------------------------------------------- 
> 
> # Select a streams library.
> SET(VTK_USE_ANSI_STDLIB_DEFAULT ON)
> IF(NOT CMAKE_COMPILER_IS_GNUCXX)
>  IF(CMAKE_BUILD_TOOL MATCHES "devenv")
>  ELSE(CMAKE_BUILD_TOOL MATCHES "devenv")
>    SET(VTK_USE_ANSI_STDLIB_DEFAULT OFF)
>  ENDIF(CMAKE_BUILD_TOOL MATCHES "devenv")
> ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
> OPTION(VTK_USE_ANSI_STDLIB "Use the ANSI standard iostream library."
>       ${VTK_USE_ANSI_STDLIB_DEFAULT})
> MARK_AS_ADVANCED(VTK_USE_ANSI_STDLIB)
> 
> #-----------------------------------------------------------------------
> 
> Does this mean it build VTK with the VTK_USE_ANSI_STDLIB or not??
> 
> 
> My final objective is to take a Dicom set of data from an 
> echocardiography and segmentat various slices of the left ventricle in
> rebuilt a 3d model of it and later on change it to 4d with elasticity 
> parameters. Can you give some lights on what is best of the ITK package 
> to achieve this? Thanks for everything.
> 
> Regards,
> Helder
> 
> 
> 
> 
> 
> 
> 
> 
>> From: Luis Ibanez <luis.ibanez@kitware.com>
>> To: Helder Carvalho <hel_carvalho@hotmail.com>
>> CC: insight-users@public.kitware.com
>> Subject: Re: [Insight-users] Examples error in VC++
>> Date: Mon, 07 Apr 2003 22:51:21 -0400
>>
>>
>> Hi Helder,
>>
>> It looks like you moved the example out of the ITK source tree.
>>
>> That's ok,
>> but you will have to adapt the CMakeLists.txt accordingly.
>>
>> From the errors in your build it seems that your adaptation of
>> the CMakeLists.txt file still needs some work.  Could you please
>> post your CMakeLists.txt file to the list ?
>>
>> Or if you feel like trying something, take a look at the
>> CMakeLists.txt file in
>>
>>     Insight/Examples/Installation
>>
>> This one is intended to be used outside the source tree.
>>
>>
>>
>> Regards,
>>
>>
>>     Luis
>>
>>
>> ----------------------------
>>
>> Helder Carvalho wrote:
>>
>>> Hi U all,
>>>
>>> I’ve been trying to build the examples of ITK but all I get is more 
>>> than 100 errors like this:
>>> Compiling...
>>> Image1.cxx
>>> C:\PROGRAM 
>>> FILES\INSIGHTTOOLKIT-1.2.0\CODE\NUMERICS\VXL\vnl/vnl_vector.h(320) : 
>>> error C2653: 'vcl_generic_iosfwd_STD' : is not a class or namespace name
>>>
>>>  C:\PROGRAM 
>>> FILES\INSIGHTTOOLKIT-1.2.0\CODE\NUMERICS\VXL\vnl/vnl_vector.h(355) : 
>>> see reference to class template instantiation 'vnl_vector<T>' being 
>>> compiled
>>>
>>> C:\PROGRAM 
>>> FILES\INSIGHTTOOLKIT-1.2.0\CODE\NUMERICS\VXL\vnl/vnl_vector.h(320) : 
>>> error C2061: syntax error : identifier 'istream'
>>>
>>> C:\PROGRAM 
>>> FILES\INSIGHTTOOLKIT-1.2.0\CODE\NUMERICS\VXL\vnl/vnl_vector.h(355) : 
>>> see reference to class template instantiation 'vnl_vector<T>' being 
>>> compiled
>>>
>>> C:\PROGRAM 
>>> FILES\INSIGHTTOOLKIT-1.2.0\CODE\NUMERICS\VXL\vnl/vnl_vector.h(323) : 
>>> error C2653: 'vcl_generic_iosfwd_STD' : is not a class or namespace name
>>>
>>> I’ve built the itk.dsw and I had no problems. I’ve also built the 
>>> applications folder that I’ve downloaded via CVS and I got no 
>>> problems either. To built the examples I created a project via CMake 
>>> based on the cmakelist of the examples folder.
>>> I’m working with visual C++ 6.0, with service pack 5 installed, CMake 
>>> 1.6.6 and the latest VTK and FLTK I got via CVS.
>>>
>>> Thanks in advance,
>>> Helder Carvalho
>>>
>>>
>>>
>>>
>>>
>>>
>>> _________________________________________________________________
>>> Add photos to your messages with MSN 8. Get 2 months FREE*. 
>>> http://join.msn.com/?page=features/featuredemail
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users@public.kitware.com
>>> http://public.kitware.com/mailman/listinfo/insight-users
>>>
>>
>>
>>
> 
> 
> _________________________________________________________________
> Tired of spam? Get advanced junk mail protection with MSN 8. 
> http://join.msn.com/?page=features/junkmail
> 
>