[Insight-users] itk in MFC
Luis Ibanez
luis.ibanez at kitware.com
Thu Oct 28 10:35:53 EDT 2004
Hi Pan,
Problem : You are not using CMake in order to configure
your project. If you were, CMake would have
enable for you the correct compiler options.
In your particular case you are failing to
activate the support for RTTI and Exceptions.
Solution A: Use CMake for configuring your project :-)
Solution B: Edit the options of your VC++ project and
enable exceptions. This will pass the option
/GR to the compiler.
Regards,
Luis
-----------------------------------------------------------
Pan Ross wrote:
> I can run such codes in console under Windows, but when I put them into
> a MFC Doc/View project, it does work.
> typedef itk::RGBPixel< unsigned char > PixelType;
> typedef itk::Image< PixelType, 2 > ImageType;
> typedef itk::ImageFileReader< ImageType > ReaderType;
> ReaderType::Pointer reader = ReaderType::New();
> reader->SetFileName("c:\\lena_std.jpg");//argv[1] );
> reader->Update();
>
> The error is "Abnormal in 0x7c81eb33 : Microsoft C++ exception:
> __non_rtti_object @ 0x0012f3a0"
>
> Can anyone help me with this?
>
>
More information about the Insight-users
mailing list