Re: calendar problem when calling quantlib lib from java

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/calendar-problem-when-calling-quantlib-lib-from-java-tp5595p5610.html

On Thu, 2008-02-14 at 08:40 -0800, moloko wrote:

> So, I've been able to run my simple test file which does not use JNI ( only
> QuantLib ), thanks to Luigi.
> So now, I gonna try to be more precise about my main issue:
>
> I've got a cpp file which is calling QL functions and JNI to produce
> functions in a library called in a java process.
> I need to update our QuantLib version from 0.3.4 to 0.8.1.
>
> The problem is that my java process crash at runtime.
> I've tried to isolate the line responsible for that crash

> I've copy-pasted the cpp file
> -------------------------------------
> #include <ql/quantlib.hpp>
> #include <jni.h>
> #include "QuantLibCalculation.h"
>
> using namespace QuantLib;
>
> JNIEXPORT jboolean JNICALL toto
> (){
>
> Calendar calendar = UnitedStates();
> //DayCounter dayCounter = Thirty360(Thirty360::European);
>
>
> return JNI_TRUE;
> }
> -------------------------------------
> here is the command line I use to compile :
>  g++ -o libFTXQuantLib.o -shared -I/usr/java/jdk_1.5.0_11/include
> -I/usr/java/jdk_1.5.0_11/include/linux -lQuantLib QuantLibCalculationNEW.cpp
> -fPIC

Pierre,
        are you sure the linker is not picking up the old 0.3.4 library? Did
you uninstall it, or is it still there somewhere?

Luigi


--

It is better to know some of the questions than all of the answers.
-- James Thurber



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users