[Gdal-dev] need RTTI for OGR (Windows)
Chapman, Martin
MChapman at sanz.com
Fri Apr 7 12:03:24 EDT 2006
Ellen,
That is a setting you have to make in your VC++ studio project settings,
not the dependencies. To do this go to the properties sheet of your
project, then select C++->Language->Enable Run-Time Type Info and set it
to true. Then clean and rebuild your project.
Martin
-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of EllenD
Sent: Friday, April 07, 2006 6:31 AM
To: gdal-dev at lists.maptools.org
Subject: [Gdal-dev] need RTTI for OGR (Windows)
Hi,
I want to perform a dynamic_cast on an OGRGeometry* object as follows:
OGRGeometry *poGeometry .... // not null
...
switch (poGeometry->getGeometryType())
{
.....
case wkbPolygon:
MyFunc( dynamic_cast<OGRPolygon *>(poGeometry));
....
}
MyFunc(OGRPolygon *poPolygon)
{
.....
}
Running this code under Linux works fine, but under Visual Studio I get
the
runtime following error:
Unhandled exception @ .... : Microsoft C++ exception: __non_rtti_object
@
....
I am using GDAL 1.3.1 and tried to compile it with the /GR option added
to
the OPTFLAGS compiler flags in nmake.opt. The compilation and
installation
are successfull, but I still get the error.
How can I compile GDAL so that OGR (and GDAL) has RTTI support or is
something else wrong?
Ellen
--
View this message in context:
http://www.nabble.com/need-RTTI-for-OGR-%28Windows%29-t1411792.html#a380
2726
Sent from the GDAL - Dev forum at Nabble.com.
_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/gdal-dev
More information about the Gdal-dev
mailing list