|
From: Joseph W. <jo...@gn...> - 2007-02-01 04:37:20
|
Yikes. That option problem is nasty. I've fixed that in HEAD. It may take me a few days to go through the other= =20 patches. Thanks!!! =D4=DA Tuesday 30 January 2007 15:20=A3=AC=C4=FA=D0=B4=B5=C0=A3=BA > Joe, > > In the course of playing with QuantLib we've found some problems with > the Java compilation of the QuantLib-SWIG project. > > We've made some modifications to the configuration files, please see > the attached patch. > Would be great if this can be included into the HEAD of the > QuantLib-SWIG project. > The diffs are based on the QuantLib-SWIG-0.3.14 release, and i don't > think there have been any changes to the relevant files since the > release. > > The patch file expects there to be a directory QuantLib-SWIG-0.3.14 > and the changes to be made in a dir called > QuantLib-SWIG-0.3.14_java_patch. However, you can just run it with > 'patch -p1 < quantlib-swig_java_ver_1.6-head.patch' in the HEAD of > QuantLib-SWIG and it'll apply the changes. > > Also, it seems that there's a discrepancy with the SWIG/options.i file > and the way the Option.Type enum is defined. I think the current file > in the HEAD of SWiG/options.i has the values reversed - the > Quantlib option.hpp file has it this way at > http://quantlib.cvs.sourceforge.net/quantlib/QuantLib/ql/option.hpp?revis= io >n=3D1.41&view=3Dmarkup enum Type { Put =3D -1, Call =3D 1 }; > while the SWIG/options.i is > enum Type { Call =3D -1, Put =3D 1}; > I took the liberty of flipping it to look like the option.hpp file in > the patch as well. > > The patch file also contains a small test program Hello.java that does > a basic sanity check to make sure the created Java library works. > And it expects the variable JAVA_HOME to be declared and pointing to > the location of the JDK, and tries to place the generated java wrapper > library into the lib/ directory under the JRE. > > hope this helps. please let me know if you need me to change anything, > or if things don't work for you. > > On 1/29/07, Joseph Wang <jo...@gn...> wrote: > > The SWIG bindings usually lag the Quantlib libraries a bit, but since I > > need to use them, I've been trying my best to sync them up. I'm working > > mainly with the Python and R binding, so if there is anything broken in > > the other bindings, let me know and I'll try to fix them. =2D-=20 =2D------------------------------------------------------------------------= =2D----- Joseph Wang Ph.D. - jo...@gn... =20 China Derivatives Researcher and Software Developer - QuantLib http://en.wikiversity.org/wiki/User:Roadrunner |