gpt4 book ai didi

objective-c - 为 iOS 构建静态 Graphviz 库

转载 作者:可可西里 更新时间:2023-11-01 03:33:19 26 4
gpt4 key购买 nike

我正在尝试为 Graphviz 构建静态库以将它们包含在 iOS 应用程序中,但我无法让它工作。这是我到目前为止所做的,使用 graphviz 2.28.0]、Xcode 4.1、OSX 10.7,我的目标是 iOS 模拟器。

我找到了 Glen Low's configure instructions ,并根据一些有根据的猜测将这些更新为:

./configure --build=i486-apple-darwin --host=arm-apple-darwin9 --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 CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" CPP="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -E" CXX="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2" CXXCPP="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -E" OBJC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" LD="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld" CPPFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -miphoneos-version-min=4.0" CXXCPPFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -miphoneos-version-min=4.0"

这行得通,但随后“make”运行了一段时间并出现错误:

Making all in gvpr
CCLD mkdefs
ld: warning: ignoring file mkdefs.o, file was built for armv6 which is not the architecture being linked (i386)
ld: warning: ignoring file /usr/local/lib/libSystem.dylib, missing required architecture i386 in file
ld: warning: symbol dyld_stub_binder not found, normally in libSystem.dylib
Undefined symbols for architecture i386:
"_exit", referenced from:
start in crt1.10.6.o
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[3]: *** [mkdefs] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

我不太了解所有架构规范,因此非常欢迎任何帮助使其正常工作。

最佳答案

问题是 mkdefs 在创建后的构建过程中执行。因此,如果您为 armv6 或 armv7 构建文件,则无法在 Mac OS X 的命令行上执行该文件。我的解决方法是为体系结构 i386 构建一个 mkdefs(iPhone 模拟器也需要)并将其复制到库中/gvpr 目录出现此错误后。确保文件无法被覆盖并重新启动构建。

关于objective-c - 为 iOS 构建静态 Graphviz 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7224827/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com