<div dir="ltr"><div><div>Hi all,<br><br>I had a change to see the link<br><a href="http://stackoverflow.com/questions/12643898/incorporating-gdal-ogr-into-an-ios-project-a-quick-guide">http://stackoverflow.com/questions/12643898/incorporating-gdal-ogr-into-an-ios-project-a-quick-guide</a><br><br>This was guiding to build with Xcode 4.0, the above link says that it doesn't work with Xcode version above 4.0<br><br>I just wanted to build GDAL as static library for iPhone and use the OGR library there in iPhone.<br><br>I modified the build script as shown here, build_gdal_ios_cus.sh<br><br>#!/bin/bash<br>if [ "$#" -eq 0 ]<br>then<br>    echo "No parameters supplied"<br>else<br>    default_prefix="${HOME}/Documents/iOS_GDAL"<br>    prefix="${default_prefix}"<br>    if [ "$1" == "arm" ]<br>    then<br>        arch="armv7"<br>    fi<br>    if [ "$1" == "sim" ]<br>    then<br>        arch="i386"<br>    fi<br>    if [ "$2" == "iPhone" ]<br>    then<br>        export PATH=$PATH:/Users/w1/ctools<br>        echo $PATH<br>        #extra_cflags="-m${thumb_opt:-no-thumb} -mthumb-interwork"<br>        platform="iPhone"<br>        platform_dir="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain"<br>        platform_bin_dir="${platform_dir}/usr/bin"<br>        platform_sdk_dir="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/"<br>        prefix="${prefix}/${arch}/${platform}.platform/iPhoneOS.sdk"<br>        echo library will be exported to $prefix<br>        #export CC="${platform_bin_dir}/clang"<br>        export INCDIR="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include"<br>        export INCDIR1="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1/tr1"<br>        export INCDIRCPP="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1"<br>        #export CFLAGS="-std=gnu99 -nostdinc -I${INCDIR} -I${INCDIRCPP} -I${INCDIR1} -arch ${arch} -pipe -Os -gdwarf-2 -isysroot ${platform_sdk_dir}"<br>        export CFLAGS="-std=gnu99 -nostdinc -I${INCDIR} -I${INCDIR1} -arch ${arch} -pipe -Os -gdwarf-2 -isysroot ${platform_sdk_dir}"<br>        export LDFLAGS="-arch ${arch} -isysroot ${platform_sdk_dir}"<br>        export CXXFLAGS="-stdlib=libstdc++ -nostdinc++ -I${INCDIR} -I${INCDIRCPP} -arch ${arch} -pipe -Os -gdwarf-2 -isysroot ${platform_sdk_dir}"<br>    fi<br>    if [ "$1" == "sim" ]<br>    then<br>        platform="iPhoneSimulator"<br>    fi<br>    ./configure \<br>        --prefix="${prefix}" \<br>        --host="${arch}-apple-darwin" \<br>        --disable-shared \<br>        --enable-static \<br>        --with-unix-stdio-64=no<br>fi<br><br><br>I created symbolic links to  <br> armv7-apple-darwin-gcc -> /usr/bin/llvm-gcc<br> armv7-apple-darwin-g++ -> /usr/bin/llvm-g++<br><br>Actually points<br> llvm-g++ -> clang++<br> llvm-gcc -> clang<br><br>Above script was invoked as<br>./build_gdal_ios_cus.sh arm iPhone<br><br>Configure succeeded.<br><br>when I run<br><br>make<br>I get error like this<br><br>(cd alg; /Applications/Xcode.app/Contents/Developer/usr/bin/make)<br>/bin/sh /Users/w1/gdal-2.1.0/libtool --mode=compile --tag=CC armv7-apple-darwin-gcc -I/Users/w1/gdal-2.1.0/port -I/Users/w1/gdal-2.1.0/gcore -I/Users/w1/gdal-2.1.0/alg -I/Users/w1/gdal-2.1.0/ogr -I/Users/w1/gdal-2.1.0/ogr/ogrsf_frmts -I/Users/w1/gdal-2.1.0/gnm -I/Users/w1/gdal-2.1.0/apps -std=gnu99 -nostdinc -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1/tr1 -arch armv7 -pipe -Os -gdwarf-2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/  -Wall -Wdeclaration-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wshorten-64-to-32 -Wshadow -Werror=vla -Wdeclaration-after-statement -Wnull-dereference  -DINTERNAL_QHULL -Ilibqhull -DOGR_ENABLED -I/Users/w1/gdal-2.1.0/port  -DGDAL_COMPILATION  -c -o delaunay.lo delaunay.c<br>libtool: compile:  armv7-apple-darwin-gcc -I/Users/w1/gdal-2.1.0/port -I/Users/w1/gdal-2.1.0/gcore -I/Users/w1/gdal-2.1.0/alg -I/Users/w1/gdal-2.1.0/ogr -I/Users/w1/gdal-2.1.0/ogr/ogrsf_frmts -I/Users/w1/gdal-2.1.0/gnm -I/Users/w1/gdal-2.1.0/apps -std=gnu99 -nostdinc -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1/tr1 -arch armv7 -pipe -Os -gdwarf-2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ -Wall -Wdeclaration-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wshorten-64-to-32 -Wshadow -Werror=vla -Wdeclaration-after-statement -Wnull-dereference -DINTERNAL_QHULL -Ilibqhull -DOGR_ENABLED -I/Users/w1/gdal-2.1.0/port -DGDAL_COMPILATION -c delaunay.c -o delaunay.o<br>In file included from delaunay.c:62:<br>In file included from /w1/gdal-2.1.0/alg/internal_qhull_headers.h:977:<br>libqhull/libqhull.c:64:34: error: use of undeclared identifier 'DBL_MAX'<br>  if (qh RERUN || qh JOGGLEmax < REALmax/2)<br>                                 ^<br>libqhull/user.h:145:17: note: expanded from macro 'REALmax'<br>#define REALmax DBL_MAX<br>                ^<br>In file included from delaunay.c:62:<br>In file included from /w1/gdal-2.1.0/alg/internal_qhull_headers.h:977:<br>libqhull/libqhull.c:301:37: error: use of undeclared identifier 'DBL_MAX'<br>    if (!qh RERUN && qh JOGGLEmax < REALmax/2) {<br>                                    ^<br>libqhull/user.h:145:17: note: expanded from macro 'REALmax'<br>#define REALmax DBL_MAX<br>                ^<br>In file included from delaunay.c:62:<br>In file included from /w1/gdal-2.1.0/alg/internal_qhull_headers.h:977:<br>libqhull/libqhull.c:325:49: error: use of undeclared identifier 'DBL_MAX'<br>      if (qh TRACEpoint != -1 || qh TRACEdist < REALmax/2 || qh TRACEmerge) {<br>                                                ^<br>libqhull/<br><br>It seems that the float.h or cfloat does't have such definition or implementation for arm target<br><br></div>Questions:<br><br></div><div>1. Can we build GDAL for iPhone with arm7 targert ??<br><br></div><div>2. Did I have missed or misconfigured something ???<br><br></div><div>Any suggestion or references on web will be of great help.<br><br></div><div>Thanks<br></div><div>Gane<br></div><div><br></div><div><div><br></div></div></div>