Login  Register

Re: swig some class are not wrapped

Posted by archlight on Mar 07, 2011; 2:43pm
URL: http://quantlib.414.s1.nabble.com/swig-some-class-are-not-wrapped-tp6058p6069.html

Hi 

   I have been stuck on this for quite some time. I managed to get it compiled. but I get error RuntimeError: Boost assertion failed: px != 0

   basically i took two approaches. 

   1) pass boost::shared_ptr<Index> in SwaptionVolCube2 constructor and dynamically cast to boost::shared_ptr<SwapIndex>. the reason is EuriborSwapIsdaFixA is casted as boost::shared_ptr<Index> but  SwaptionVolCube2  accepts only SwapIndex

   2) change export_swap_instance macro and cast EuriborSwapIsdaFixA as boost::shared_ptr<SwapIndex> so it can pass in constuctor

   attached are two version interface file and testing python, please take a look when you have a time

Regards

On Thu, Mar 3, 2011 at 11:10 PM, ren wei <[hidden email]> wrote:
I am using swig 2.0.1 and quantlib compiled by VC 2008 as required by python 2.7

What version do you use to generate quantlib_wrapper? maybe I should back date to that version

Regards


On Thu, Mar 3, 2011 at 9:39 PM, Luigi Ballabio <[hidden email]> wrote:
On Thu, 2011-03-03 at 18:08 +0800, ren wei wrote:
> Hi Luigi,
>
>    Thanks for your reply. it is working with quantlib_wrapper in the
> download package. if I use swig to generate myself, it has such
> problem even though I don't touch any interface files.
>
>    is it swig version issue?

Possibly.  What SWIG version and QuantLib version are you using?

Luigi


--

Prediction is very difficult, especially if it's about the future.
-- Niels Bohr





------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

cmscaps.py (5K) Download Attachment
indexes.i (18K) Download Attachment
volatilities.i (25K) Download Attachment
volatilities_v1.0.i (25K) Download Attachment
indexes_v1.0.i (18K) Download Attachment