Build static Graphviz libraries for iOS

后端 未结 3 612
庸人自扰
庸人自扰 2021-02-06 05:55

I am trying build the static libraries for Graphviz to include them in in an iOS app, but I can\'t get it to work. Here\'s what I have done so far, using graphviz 2.28.0], Xcode

3条回答
  •  抹茶落季
    2021-02-06 06:36

    I got this working. The build script fails at the end when it tried to make an executable since it's compiled for i386 instead of x86 or x86_64 but all the libraries build just fine.

    # For iPhoneOS
    export DEV_iOS=/Developer/Platforms/iPhoneOS.platform/Developer
    export SDK_iOS=${DEV_iOS}/SDKs/iPhoneOS5.0.sdk
    export COMPILER_iOS=${DEV_iOS}/usr/bin
    export CC=${COMPILER_iOS}/gcc
    export CXX=${COMPILER_iOS}/g++
    export LDFLAGS="-arch armv7 -pipe -Os -gdwarf-2 -no-cpp-precomp -mthumb -isysroot ${SDK_iOS}"
    export CFLAGS=${LDFLAGS}
    export CXXFLAGS=${LDFLAGS}
    export LD=${COMPILER_iOS}/ld
    export CPP=${COMPILER_iOS}/llvm-cpp-4.2
    export AR=${COMPILER_iOS}/ar
    export AS=${COMPILER_iOS}/as
    export NM=${COMPILER_iOS}/nm
    export CXXCPP=${COMPILER_iOS}/llvm-cpp-4.2
    export RANLIB=${COMPILER_iOS}/ranlib
    
    ./configure --host=arm-apple-darwin11 --disable-dependency-tracking --enable-shared=no --enable-static=yes --enable-ltdl-install=no --enable-ltdl=no --enable-swig=no --enable-tcl=no --with-codegens=no --with-fontconfig=no --with-freetype2=no --with-ipsepcola=yes --with-libgd=no --with-quartz=yes --with-visio=yes --with-x=no --with-cgraph=no
    

提交回复
热议问题