You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[21:51] * EvenR surprised to see OGR typedefs being redefined in QGIS files ! Why not including OGR headers ??
[21:51] #include "ogr_api.h" et #include "ogr_srs_api.h" should do it
[21:52] that would make the #ifdef DEBUG #else stuff non necessary
Right, for gdalprovider, it is better to use OGRSpatialReferenceH directly.
In qgsvectorfilewriter.h, we cannot include ogr headers because there are problems compiling the python bindings if the ogr data structures are visible.
Right, for gdalprovider, it is better to use OGRSpatialReferenceH directly.
In qgsvectorfilewriter.h, we cannot include ogr headers because there are
problems compiling the python bindings if the ogr data structures are
visible.
What kind of problems ? The OGR headers are included when compiling the OGR
Python bindings.
Actually it seems to compile if I just remove the typedef section... Don't know what the reason for the typedefs was then (it seems to come from the c-api port five years ago)
5 commit comments
rouault commentedon Mar 12, 2013
[21:51] * EvenR surprised to see OGR typedefs being redefined in QGIS files ! Why not including OGR headers ??
[21:51] #include "ogr_api.h" et #include "ogr_srs_api.h" should do it
[21:52] that would make the #ifdef DEBUG #else stuff non necessary
rouault commentedon Mar 12, 2013
the
void* hCRS = OSRNewSpatialReference( NULL );
line shoud be just replaced by :
OGRSpatialReferenceH hCRS = OSRNewSpatialReference( NULL );
would work in DEBUG and non DEBUG mode
mhugent commentedon Mar 13, 2013
Right, for gdalprovider, it is better to use OGRSpatialReferenceH directly.
In qgsvectorfilewriter.h, we cannot include ogr headers because there are problems compiling the python bindings if the ogr data structures are visible.
rouault commentedon Mar 13, 2013
mhugent commentedon Mar 14, 2013
Actually it seems to compile if I just remove the typedef section... Don't know what the reason for the typedefs was then (it seems to come from the c-api port five years ago)