[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-dev
Subject:    Re: GCJ Native Library Success
From:       Nicola Ken Barozzi <nicolaken () apache ! org>
Date:       2002-11-16 22:28:26
[Download RAW message or body]


Cool! :-)

I'll see if I can add this to our build process in the near future.
Thanks!

TJ Mather wrote:
> Hi,
> 
> I was able to get Apache POI to compile down to a shared library by
> compiling *.java -> *.class using Ant with Sun JDK, then running
> gcj -shared -o poi.so `cat classlist.txt` where the classlist contained 
> the core HSSF files (not the ones that used Swing, etc)[1].  I had to 
> compile FormulaParser.java, POIFSViewEngine.java, and HexRead.java to 
> *.class using GCJ, because I got a "bad pc in exception_table" if I tried 
> to compile the JDK *.class to *.so using GCJ.  Also note that *.java -> 
> *.class using GCJ doesn't work for some *.java files.
> 
> I was able to get the C++ native shared library to work with one of the 
> test examples using an adaption of Martin's patch.  For more details on
> how to recreate the POI example in C++ see:
> http://tjmather.com/poifilter/
> 
> The patch needed for POI to compile and run under GCJ is at
> http://tjmather.com/poifilter/gcjpoi.patch
> 
> This is basically Martin's patch plus some fixes for the hpsf/*.java
> files required for ./build.sh compile to run, and (Object) typecast
> in poifs/dev/POIFSViewEngine.java required for GCJ to compile the
> shared library.



-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:poi-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:poi-dev-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic