[Insight-users] Problems when building ITK based applications in a Visual C++6 environment

Luis Ibanez luis.ibanez at kitware.com
Sun Sep 26 19:02:12 EDT 2004


Hi Henry,

Your life will be much simpler if you use CMake...

but if you insist in configuring your project in the
hard way, then you must enable the use of Exceptions.

     You do this by adding /GR compiler option.

Please check on the compiler options of your project
and enable exceptions.

If you were using CMake, it will take care of this
annoying little details, and you would be doing image
processing instead of tweaking compiler options.



   Regards,


     Luis



------------------
Henry Joye wrote:
> Hi, all,
> 
> I am using ITK in an OpenInventor based project on
> Windows Xp and build it in Visual C++ 6. I donot use
> CMake in my project. In order to build the project, I
> set the include path of ITK in Visual C++ 6 through
> ¡°Tools¡±-->¡±Options¡±-->¡±Directories¡±. Because
> there is no separate specific folder of ¡°Include¡± in
> ITK, I add ¡°\Insight\InsightToolkit18\Code\Common¡±,
> ¡°\Insight\InsightToolkit18\Code\Algorithms¡±, and ITK
> binary folder ¡°ITKBin¡± into the include path
> environment. When I build the project, the project ask
> for the path of ¡°VCL¡±, I also add
> ¡°\INSIGHTTOOLKIT18\UTILITIES\VXL\VCL¡± into the
> include path. After these steps, I begin to build the
> project and receive following errors and warnings
> (there are several this kind of warning for every ITK
> related project file):
> 
> e:\insighttoolkit18\code\common\itkeventobject.h(134)
> : warning C4541: 'dynamic_cast' used on polymorphic
> type 'class itk::EventObject' with /GR-; unpredictable
> behavior may result
> e:\insighttoolkit18\code\common\itkeventobject.h(135)
> : warning C4541: 'dynamic_cast' used on 
> ¡­¡­¡­¡­¡­
> e:\insighttoolkit18\code\common\itkeventobject.h(138)
> : warning C4541: 'dynamic_cast' used on polymorphic
> type 'class itk::EventObject' with /GR-; unpredictable
> behavior may result
> e:\insighttoolkit18\code\common\itkeventobject.h(139)
> : warning C4541: 'dynamic_cast' used on polymorphic
> type 'class itk::EventObject' with /GR-; unpredictable
> behavior may result
> ¡­¡­¡­¡­¡­¡­
> e:\insighttoolkit18\utilities\vxl\vcl\vcl_compiler.h(134)
> : fatal error C1083: Cannot open include file:
> 'vcl_config_manual.h': No such file or directory
> 
> My questions are:
> 1)	What causes these warnings and errors?
> 2)	How to build a ITK based project in Visual C++ 6
> without using CMake?
> 3)	Is it possible to create a separate ¡°Include¡±
> folder to be used during building applications?
> 4)	How to solve these problems?
> 
> Thanks in advance!
> 
> Joye
> 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> _______________________________________________
> 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