[gdal-dev] Cannot compile 1.10 for iOS due to missing crt_extern

Nik Sands nixanz at nixanz.com
Sun Aug 11 17:17:33 PDT 2013


Hi list members,

I was able to build GDAL 1.9 for iOS, and I can build 1.10 for the iOS simulator, however I cannot compile GDAL 1.10 for the actual iOS (devices).  It appears that this is because crt_extern is not included in iOS.

The code that trips up the build is in 'cpl_spawn.cpp' and appears to be:

	#ifdef __APPLE__
	#include <crt_externs.h>

The last few lines of the build output are below.

Is there some way that I can get GDAL 1.10 built for iOS?  I really need one of the changes that was included in this version.

Thanks in advance for any advice that you may be able to provide.

Cheers,
Nik.


libtool: compile:  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -arch armv7 -pipe -Os -gdwarf-2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -mno-thumb -mthumb-interwork -Wall -DOGR_ENABLED -I/Users/nsands/Documents/Nik/Development/gdal-1.10.0/port -DHAVE_LIBZ -I/usr/include/libxml2 -DHAVE_LIBXML2 -c cpl_spawn.cpp -o cpl_spawn.o
cpl_spawn.cpp:465:25: error: crt_externs.h: No such file or directory
cpl_spawn.cpp: In function 'CPLSpawnedProcess* CPLSpawnAsync(int (*)(CPL_FILE_HANDLE, CPL_FILE_HANDLE), const char* const*, int, int, int, char**)':
cpl_spawn.cpp:727: error: '_NSGetEnviron' was not declared in this scope
make[1]: *** [cpl_spawn.lo] Error 1
make: *** [port-target] Error 2


More information about the gdal-dev mailing list