适用于iOS的静态Graphviz库

时间:2013-07-11 17:14:52

标签: iphone ios static-libraries graphviz configure

我一直在尝试为iOS构建静态armv7和i386 Graphviz库。我几乎遵循了每个教程,最终设法构建了两个库。我将每个i386 * .a库文件复制到Xcode中的一个文件夹中。我对每个* .a armv7文件和每个* .h头文件都这样做。我的问题是Xcode抛出符号未找到的错误。关于为什么没有找到符号的任何想法?

Undefined symbols for architecture armv7:
  "_drawGraph", referenced from:
      -[FNETGraph render] in FNETGraph.o
  "_createGraph", referenced from:
      -[FNETGraph render] in FNETGraph.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

这是我对armv7的配置和make代码:

export DEV_iOS=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
export SDK_iOS=${DEV_iOS}/SDKs/iPhoneOS6.1.sdk
export COMPILER_iOS=${DEV_iOS}/usr/bin

export CC=${COMPILER_iOS}/gcc
export CPP=${COMPILER_iOS}/llvm-cpp-4.2
export CXX=${COMPILER_iOS}/g++
export CXXCPP=${COMPILER_iOS}/g++
export OBJC=${COMPILER_iOS}/gcc
export LD=${COMPILER_iOS}/ld

export LDFLAGS="-arch armv7 -isysroot ${SDK_iOS}"
export CFLAGS="${LDFLAGS} -miphoneos-version-min=6.1"
export CXXFLAGS="${LDFLAGS} -miphoneos-version-min=6.1 -fvisibility-inlines-hidden"
export CXXCPPFLAGS="${LDFLAGS} -miphoneos-version-min=6.1"
export OBJCFLAGS="${LDFLAGS} -miphoneos-version-min=6.1 -fvisibility-inlines-hidden"

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=yes

make
touch lib/gvpr/gdefs.h
make

mkdir -p ~/Desktop/Graphiz/armv7
find . -name '*.a' -execdir cp '{}' ~/Desktop/Graphiz/armv7 \;

mkdir -p ~/Desktop/Graphiz/headers
find . -name '*.h' -execdir cp '{}' ~/Desktop/Graphiz/headers \;

0 个答案:

没有答案