Hi, I'm trying to port pdlib (http://gitorious.org/pdlib/libpd) to Java using Cibyl (http://code.google.com/p/cibyl/) so that I can use pdlib on Blackberry devices. You can see the project at https://github.com/appsfactory/jlibpd if you like. I've also been keeping a log of my progress on a GitHub wiki page at https://github.com/appsfactory/jlibpd/wiki/Cibyl-Log.
I've been successful in compiling most of it to intermediate MIPS code (which Cibyl then translates to Java byte code), however there are two c library files that are not implemented in the Cibyl toolchain (dlfcn.h and socket.h).
There are three files in pure data that link to these two: socket.h: s_inter.c and x_net.c dlfcn.h: s_loader.c
I have two options for getting around this. I could either:
use Cibyl to link to these (example: https://github.com/SimonKagstrom/cibyl/tree/master/examples/host-java/export...), OR 2. Port libpd without using these headers.
So, since it's not exactly ideal to re-implement these headers in Java (I don't even know if it's possible), is there a way that I can pull these files out of the pure data project? I'm not entirely sure what they do, or how essential/core they are to the project. Can I just remove certain (unneeded?) functionality?
Another option is to rewrite these files so that they don't use socket.h or dlfcn.h. I don't know how possible that is either. I thought that before I dive in and start figuring out the whole project structure and what each of the files do, I should see if anyone that already knows could fill me in on the feasibility of this...
Thanks, -Andrew