[gdal-dev] C4251 warnings in VS2017

Michel Dastous Michel.Dastous at bentley.com
Tue Jun 11 05:46:54 PDT 2019


Hi all,

I know this is an old issue (according to this ticket https://trac.osgeo.org/gdal/ticket/4099), but surprisingly Im still getting C4251 warnings on VS2017 and GDAL 3 if my project is compiled with /W2 or more.   It occurs as soon as I include ogrsf_frmts.h

Sample warning message:
1>e:\mapserverlibs\include\ogr_featurestyle.h(89,41): warning C4251:  'OGRStyleTable::osLastRequestedStyleName': class 'CPLString' needs to have dll-interface to be used by clients of class 'OGRStyleTable'
1>e:\mapserverlibs\include\ogr_featurestyle.h(89,41): warning C4251:     CPLString osLastRequestedStyleName{};
1>e:\mapserverlibs\include\ogr_featurestyle.h(89,41): warning C4251:                                         ^

Is it still an ongoing issue or am I missing some compile option?

Thanks,

Michel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190611/faaf099f/attachment.html>


More information about the gdal-dev mailing list