[gdal-dev] Compiling ECW 3.3 on MacOSX

2018-01-03 Thread Jeremy Palmer
I'm trying to compile ECW support for GDAL using the older 3.3 SDK for
MacOSX 10.13. I downloaded the source for libecwj2-3.3-2006-09-06.zip and
applied the cumulative patch : ​
https://trac.osgeo.org/gdal/attachment/wiki/ECW/libecwj2-3.3.patch. I then
ran the following standard build commands:

./configure
make

But I get the following error:

/Users/jpalmer/Documents/Development/libecwj2/Source/include/NCSDefs.h:430:28:
error: static declaration of 'wcsdup' follows non-static declaration
static NCS_INLINE wchar_t *wcsdup(const wchar_t *s1)
   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/wchar.h:199:10:
note: previous declaration is
  here
wchar_t *wcsdup(const wchar_t *) __OSX_AVAILABLE_STARTING(__MAC_10_7,
__IPHONE_4_3);
 ^
In file included from ../C/NCSEcw/NCSJP2/NCSJP2.cpp:24:
In file included from
/Users/jpalmer/Documents/Development/libecwj2/Source/include/NCSEcw.h:73:
In file included from
/Users/jpalmer/Documents/Development/libecwj2/Source/include/ECW.h:137:
In file included from
/Users/jpalmer/Documents/Development/libecwj2/Source/include/NCSUtil.h:86:
In file included from
/Users/jpalmer/Documents/Development/libecwj2/Source/include/NCSPrefs.h:131:

Does anyone have any experience building on MacOSX, or have a handy patch
that fixes this?

Thanks :)
Jeremy
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] CPLJSONDocument

2018-01-03 Thread Dmitry Baryshnikov

Hi everybody,

Happy new year and lot of success in 2018!

I would like to discuss my pull request 
https://github.com/OSGeo/gdal/pull/282


I created a thin wrapper around the json-c library which wide using in GDAL.

This is C++ interface which hides C memory management and provides nice 
API. The web or disk json documents reading chunk by chunk with progress 
indication also added.


In future, the json-c can be easily switch to something other without 
breaking the existing code.


The CPLJSONDocument/CPLJSONObject/CPLJSONArray usage examples can be 
found in frmts/pds driver and c++ unit test in autotest/cpp/test_cpl.cpp.


Is this ready to merge into the trunk? Any objections?

Best regards,
Dmitry


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] r41166 broke the android build by using std::to_string

2018-01-03 Thread Even Rouault
On mercredi 3 janvier 2018 14:07:46 CET Alan Thomas wrote:
> Sorry about this! I knew it was only a matter of time before I would
> break the build.
> 
> In r41170 I have got rid of std::to_string for now. It's easy enough
> to replace it with CPLString().Printf(...).

I had already encountered this issue with the CAD driver. Switching to clang 
itself alone 
doesn't fix the issue, as libstdc++ was still used. It appears from https://
stackoverflow.com/questions/17950814/how-to-use-stdstoul-and-stdstoull-in-android/
18124627#18124627 that std::to_string() cannot be used with gnu libstdc++. I've 
thus 
changed the toolchain to use --stl=libc++, and that worked:
https://trac.osgeo.org/gdal/changeset/41173

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev