Hi, I&#39;m trying to port pdlib (<a href="http://gitorious.org/pdlib/libpd" target="_blank">http://gitorious.org/pdlib/libpd</a>) to Java using Cibyl (<a href="http://code.google.com/p/cibyl/" target="_blank">http://code.google.com/p/cibyl/</a>) so that I can use pdlib on Blackberry devices. You can see the project at <a href="https://github.com/appsfactory/jlibpd" target="_blank">https://github.com/appsfactory/jlibpd</a> if you like.  I&#39;ve also been keeping a log of my progress on a GitHub wiki page at <a href="https://github.com/appsfactory/jlibpd/wiki/Cibyl-Log" target="_blank">https://github.com/appsfactory/jlibpd/wiki/Cibyl-Log</a>.<br>





<br>I&#39;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).<br>

<br>There are three files in pure data that link to these two:<br>socket.h: s_inter.c and x_net.c<br>dlfcn.h: s_loader.c<br><br>I have two options for getting around this. I could either:<br>1. Write my own socket.h and dlfcn.h, with the implementation in Java, and use Cibyl to link to these (example: <a href="https://github.com/SimonKagstrom/cibyl/tree/master/examples/host-java/exporting-java-functionality-to-cibyl" target="_blank">https://github.com/SimonKagstrom/cibyl/tree/master/examples/host-java/exporting-java-functionality-to-cibyl</a>), OR<br>





2. Port libpd without using these headers.<br><br>So, since it&#39;s not 
exactly ideal to re-implement these headers in Java (I don&#39;t even know 
if it&#39;s possible), is there a way that I can pull these files out of the
 pure data project?  I&#39;m not entirely sure what they do, or how 
essential/core they are to the project.  Can I just remove certain 
(unneeded?) functionality?<br>

<br>Another option is to rewrite these files so that they don&#39;t use 
socket.h or dlfcn.h.  I don&#39;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...<br>

<br>Thanks,<br>-Andrew