Re: [Quantlib-dev] Building the Java swig bindings to quantlib

Posted by toli on
URL: http://quantlib.414.s1.nabble.com/Re-Quantlib-dev-Building-the-Java-swig-bindings-to-quantlib-tp5160.html

All,

Thanks to the great help of Ari on this list, i've been able to get
the Java bindings to compile.
For otherws with similar questions in the future, here's the short
answer on what to run in the QuantLib-SWIG-xxx/Java library after
doing 'configure/make -C Java' in top-level:
---
g++ -c quantlib_wrap.cpp -I<platform specific JVM includes>
g++ -shared quantlib_wrap.o -Wl,--add-stdcall-alias -o quantlib_wrap.so
-lquantlib -L<path to quantlib lib>

That should build the wrapper shared lib. Then in you java program you
nead to load that lib and have it and the quantlib lib on the LD_LIBRARY_PATH
---
For the long version, see the attached writeup from our wiki.

Again, huge thanks for the help on getting this to work. And if
someone knows who I can to talk to  incorporate the changes into the
distribution so as to avoid manual work in the future, please let me
know.

On 12/13/06, Toli Kuznets <[hidden email]> wrote:

> Hey everyone,
>
> This may be a newbie question - i'm new to QuantLib.
>
> I'm trying to build the Java SWIG bindings on Ubuntu.
> I have the binary version of quantlib-0.3.12 already installed, along with swig.
>
> In the QuantLib-SWIG-0.3.12 directory, i run ./configure and then make -C Java.
> That creates the org/quantlib/*.java files, along with quantlib_wrap.cpp
>
> however, it then exits with " Nothing to be done for `all-am'." and doesn't
> produce an actual C++ wrapper for quantlib.
>
> I can compile the Java files, but how do i create the C++ wrapper?
>
> running 'make' from top-level results in a different error, it fails somewhere
> in Python compilation.
>
> I have Ubuntu 6.10, quantlib-0.3.12, automake 1.9.6
>
> I've tried following the Eclipse-based instructions with Skwash, but that
> didin't work for me either.
>
> Is there no command-line way to build java swig bindings?
> Or is there something obvious that i'm missing?
>


--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://sourceforge.net/mailarchive/forum.php?forum=quantlib-users/attachments/20061214/4a972319/attachment.html