Opened 9 years ago

Closed 9 years ago

#5751 closed defect (fixed)

class OGRCurveCollection needs to be exported

Reported by: vindoctor Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

If someone wants to be able to link against gdal in its dll form, in ogr_geometry.h, OGRCurveCollection needs to be exported.

class OGRCurveCollection simply needs to be:

class CPL_DLL OGRCurveCollection

Change History (4)

comment:1 by Even Rouault, 9 years ago

Any evidence of that ? With which VS version ?

OGRCurveCollection is an internal detail and private member of exported OGRCompoundCurve and OGRCurvePolygon, so normally I don't see why it should be exported, but I've had issues related to that (weird linking error because initially the destructor of OGRCurveCollection was virtual and VS 2008 didn't like that)

But the builds at http://www.gisinternals.com/sdk/ now work fine, and the GDAL utilities link against gdal. See for example http://www.gisinternals.com/sdk/build-output/vc10-20141123-4-51-41-25-vc10-dev.txt:

	cl -I..\gcore -I..\port -I..\frmts\vrt -I..\alg -I..\ogr -I..\ogr\ogrsf_frmts  -IE:\builds\release-1600\include -DHAVE_GEOS   /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG /W4 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4018 /wd4389 /DHAVE_SSE_AT_COMPILE_TIME -IE:\builds\..\sdk\vc10\gdal-trunk\gdal\port -IE:\builds\..\sdk\vc10\gdal-trunk\gdal\ogr -IE:\builds\..\sdk\vc10\gdal-trunk\gdal\gcore  -IE:\builds\..\sdk\vc10\gdal-trunk\gdal\alg -IE:\builds\..\sdk\vc10\gdal-trunk\gdal\ogr\ogrsf_frmts  -DOGR_ENABLED  -DGDAL_COMPILATION ogr2ogr.cpp commonutils.cpp "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\lib\setargv.obj" E:\builds\..\sdk\vc10\gdal-trunk\gdal\gdal_i.lib  /link   
ogr2ogr.cpp
commonutils.cpp
Generating Code...
   Creating library ogr2ogr.lib and object ogr2ogr.exp
	if exist ogr2ogr.exe.manifest mt -manifest ogr2ogr.exe.manifest -outputresource:ogr2ogr.exe;1

comment:2 by Even Rouault, 9 years ago

Feedback on above questions appreciated

comment:3 by vindoctor, 9 years ago

Sorry for not checking in this earlier. I thought it was a simple fix but I see where you are coming from. I'm building with visual studios 2012 (v11). I got the trunk again today and have to edit the gdal code so this is exported.

Yes.. destructor " unresolved external symbol "public: thiscall OGRCurveCollection::~OGRCurveCollection(void)" (??1OGRCurveCollection@@QAE@XZ)"

comment:4 by Even Rouault, 9 years ago

Resolution: fixed
Status: newclosed

trunk r28123 "Export OGRCurveCollection class (#5751)"

Note: See TracTickets for help on using tickets.