[graphviz-interest] Graphviz on IPhone
Antonio Gioia <[email protected]> Tue, 26 Nov 2013 12:20:02 +0100
| Newsgroups | gmane.comp.video.graphviz |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I wanted try to use graphviz (source code graphviz-2.34.0.tar.gz) on iPhone.
I have builded the static libraries for iphone (architecture armv7):
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 \;
So I have linked all static libraries in my xcode project for the following
code of example:
Agraph_t *g;
Agnode_t *n, *m;
Agedge_t *e;
/* set up a graphviz context - but only once even for multiple graphs */
GVC_t *gvc = gvContext();
/* Create a simple digraph */
g = agopen("g", Agdirected, 0);
n = agnode(g, "n", 1);
m = agnode(g, "m", 1);
e = agedge(g, n, m, 0, 1);
/* Set an attribute - in this case one that affects the visible rendering
*/
agsafeset(n, "color", "red", "");
/* Output in .dot format */
NSString *documentdir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES) lastObject];
NSString *filename = [documentdir stringByAppendingPathComponent:@"out.png"];
gvRenderFilename(gvc, g, "png", [filename UTF8String]);
agclose(g);
But when I try to launch the app I have the following error:
Assertion failed: (bz.size > 0), function bezier_bb, file emit.c, line 3905.
Any suggestions is welcome. Thanks in advance for your attention.
A.G.
_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest