Undefined "_clock$UNIX2003" when building for iOS (device)
|Reported by:||nsands||Owned by:||warmerdam|
Description (last modified by )
NB: This issue was only noticeable after fixing the issue in Ticket #5197 (which caused the build to fail earlier than this issue does). Similarly to that other ticket, this issue only affects build for the iOS device, not for the iOS simulator.
GDAL 1.10 fails to build for iOS device with the output below:
libtool: link: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk gdalinfo.o commonutils.o -o gdalinfo /Users/nsands/Documents/Nik/Development/gdal-1.10.0/.libs/libgdal.a -lsqlite3 -lz -lpthread -ldl -liconv -lxml2 Undefined symbols for architecture armv7: "_clock$UNIX2003", referenced from: IVFKDataBlock::LoadGeometry() in libgdal.a(vfkdatablock.o) ld: symbol(s) not found for architecture armv7 collect2: ld returned 1 exit status make: *** [gdalinfo] Error 1 make: *** [apps-target] Error 2
My temporary work around to this problem was to edit the file 'ogr/ogrsf_frmts/vfk/vfkdatablock.cpp' and comment out the lines that referenced 'clock()' (variable assignments) and the debug line that used those variables. This resulted in a successful build, however, I'm sure there must be a better solution, which I'll leave to you guys. :-)