<div dir="ltr">Hi Gane,<div>Here is a link to my gdal iOS build script, last tested with 1.11.2, but it should still work with newer 1.11.x releases, <a href="https://gist.github.com/JesseCrocker/22eee94485bce5b3a6ea">https://gist.github.com/JesseCrocker/22eee94485bce5b3a6ea</a></div><div><br></div><div>-</div><div>Jesse</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 19, 2016 at 1:15 AM, Gane R <span dir="ltr"><<a href="mailto:gane.prog@gmail.com" target="_blank">gane.prog@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">http://stackoverflow.com/<wbr>questions/12643898/<wbr>incorporating-gdal-ogr-into-<wbr>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}/<wbr>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:-<wbr>no-thumb} -mthumb-interwork"<br>        platform="iPhone"<br>        platform_dir="/Applications/<wbr>Xcode.app/Contents/Developer/<wbr>Toolchains/XcodeDefault.<wbr>xctoolchain"<br>        platform_bin_dir="${platform_<wbr>dir}/usr/bin"<br>        platform_sdk_dir="/<wbr>Applications/Xcode.app/<wbr>Contents/Developer/Platforms/<wbr>iPhoneOS.platform/Developer/<wbr>SDKs/iPhoneOS.sdk/"<br>        prefix="${prefix}/${arch}/${<wbr>platform}.platform/iPhoneOS.<wbr>sdk"<br>        echo library will be exported to $prefix<br>        #export CC="${platform_bin_dir}/clang"<br>        export INCDIR="/Applications/Xcode.<wbr>app/Contents/Developer/<wbr>Platforms/iPhoneOS.platform/<wbr>Developer/SDKs/iPhoneOS.sdk/<wbr>usr/include"<br>        export INCDIR1="/Applications/Xcode.<wbr>app/Contents/Developer/<wbr>Platforms/iPhoneOS.platform/<wbr>Developer/SDKs/iPhoneOS.sdk/<wbr>usr/include/c++/4.2.1/tr1"<br>        export INCDIRCPP="/Applications/<wbr>Xcode.app/Contents/Developer/<wbr>Platforms/iPhoneOS.platform/<wbr>Developer/SDKs/iPhoneOS.sdk/<wbr>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/<wbr>Contents/Developer/usr/bin/<wbr>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/<wbr>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/<wbr>Contents/Developer/Platforms/<wbr>iPhoneOS.platform/Developer/<wbr>SDKs/iPhoneOS.sdk/usr/include -I/Applications/Xcode.app/<wbr>Contents/Developer/Platforms/<wbr>iPhoneOS.platform/Developer/<wbr>SDKs/iPhoneOS.sdk/usr/include/<wbr>c++/4.2.1/tr1 -arch armv7 -pipe -Os -gdwarf-2 -isysroot /Applications/Xcode.app/<wbr>Contents/Developer/Platforms/<wbr>iPhoneOS.platform/Developer/<wbr>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/<wbr>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/<wbr>Contents/Developer/Platforms/<wbr>iPhoneOS.platform/Developer/<wbr>SDKs/iPhoneOS.sdk/usr/include -I/Applications/Xcode.app/<wbr>Contents/Developer/Platforms/<wbr>iPhoneOS.platform/Developer/<wbr>SDKs/iPhoneOS.sdk/usr/include/<wbr>c++/4.2.1/tr1 -arch armv7 -pipe -Os -gdwarf-2 -isysroot /Applications/Xcode.app/<wbr>Contents/Developer/Platforms/<wbr>iPhoneOS.platform/Developer/<wbr>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_<wbr>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>                              <wbr>   ^<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_<wbr>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>                              <wbr>      ^<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_<wbr>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>                              <wbr>                  ^<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<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Gane<br></div><div><br></div><div><div><br></div></div></font></span></div>
<br>______________________________<wbr>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div>