Quantlib with Sunstudio 12.1 on Solaris 2.10/Sparc

Posted by Norbert Irmer on
URL: http://quantlib.414.s1.nabble.com/Quantlib-with-Sunstudio-12-1-on-Solaris-2-10-Sparc-tp13400.html

I finally solved my problems.

 

I had 4 unresolved symbols.

 

3 were due to functions, which were declared  and defined with different signatures, e.g.

 

  Quantlib:: DefaultEvent:: DefaultSettlement::recoveryRate

 

 was declared in "QuantLib-1.0/ql/experimental/credit/defaultevent.hpp" as

 

   Real recoveryRate(Seniority sen) const;

 

while in "QuantLib-1.0/ql/experimental/credit/defaultevent.cpp"

 

  Real recoveryRate(const Seniority sen) const { … }

 

was defined.

 

The same problem i had with the constructors:

 

  QuantLib::FdmHestonSolver::FdmHestonSolver

  QuantLib::FdmHestonHullWhiteSolver:: FdmHestonHullWhiteSolver

 

They also had different declarations and definitions (parameters declared as non-const,

but const in definition).

 

 

The 4-th unresolved symbol was the template function,

 

   ForwardOptionArguments<QuantLib::Option::arguments>::validate

 

which was not instantiated, because the template definition (defined in

/pricingengines/forward/forwardengine.hpp) was not visible at the

instantiation location.

 

I simply added the line

 

  #include <ql/pricingengines/forward/forwardengine.hpp>

 

to

 

  QuantLib-1.0/ql/instruments/forwardvanillaoption.cpp

 

and the problem was gone.

 

 

As i previously wrote, when compiling Quantlib with Sunstudio i got

a lot of undefined "M_PI", "sqrt" etc..

I solved these by simply adding lots of "#include <math.h>" to the sources,

perhaps this could be done more elegantly at a central location.

 

But overall i can say QuantLib builds and runs fine on Solaris10/Sparc/Sunstudio12.1

with only minor modifications.

 

 

 

 

 

 

 

 


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev