[Gdal-dev] RE: need RTTI for OGR (Windows)
Chapman, Martin
MChapman at sanz.com
Tue Apr 11 13:14:29 EDT 2006
Ellen,
I just found this. You're correct, it doesn't work with the change I
suggested but it should have.
// FOUND ON THE WEB FOR ANOTHER PROJECT
Important Warning: Please note that the MSVC.Net 2003 (7.1) C++ compiler
has a bug that returns a wrong 'this' pointer when calling virtual
functions of a virtual base class from a constructor, especially in
calls to dynamic_cast. This unfortunately affects gtkmm on win32. As a
result, some gtkmm programs, built on win32 using the MSVC.Net 2003
compiler, might crash with a "Access violation - no RTTI data!" message.
The gtkmm and MSVC developers are aware of this bug, which should/will
hopefully be fixed in Visual Studio 2005 beta 2. For more details see
this bugzilla entry and references therein.
You will just have to use a C style cast like:
OGRGeometry *poGeometry .... // not null
...
switch (poGeometry->getGeometryType())
{
.....
case wkbPolygon:
MyFunc( (OGRPolygon*)poGeometry);
....
}
MyFunc(OGRPolygon *poPolygon)
{
.....
}
Martin
-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of EllenD
Sent: Tuesday, April 11, 2006 5:33 AM
To: gdal-dev at lists.maptools.org
Subject: [Gdal-dev] RE: need RTTI for OGR (Windows)
Martin,
I did set the RTTI property for my Visual Studio project, but that
didn't
work. I compiled GDAL command line and added the /GR option, but that
also
didn't solve the problem. What you state in your reply to Frank's
reply,
seems logic and I also thought it was the case, but unfortunately it
won't
work. I still have no idee on how I can solve my problem.
Ellen
--
View this message in context:
http://www.nabble.com/need-RTTI-for-OGR-%28Windows%29-t1411792.html#a385
9778
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