Re: ObjectHandler 1.5 and Quantlib Addin 3.14

Posted by Joe Byers-2 on
URL: http://quantlib.414.s1.nabble.com/ObjectHandler-1-5-and-Quantlib-Addin-3-14-tp604p605.html

Eric,

I looked at the couponvectors.cpp and .hpp files from 3.14.  There is no include statement for ql/cashflow/simplecashflow.hpp or anything else, only the reference in  the code
boost::shared_ptr<QuantLib::SimpleCashFlow> simpleCashFlow =
                boost::dynamic_pointer_cast<QuantLib::SimpleCashFlow>(cashflows[i]);
            if (simpleCashFlow) {
                flowAnalysis_.push_back(cf);
                continue;
            }
I looked on the quantlib CVS at sourceforge.net at couponvectors.cpp and simplecashflow.hpp is now in an include statement.  This file has changed substantially form the tar.gz file that I downloaded.  The windows XL version of quantlibAddin does not have the above code in couponvectors.cpp or any other reference to simplecashflows.  Also, I looked at the source to verstion  3.13 and 3.13 where simplecashflows were not in their files either.

I am stumped.

Take care and Thanks
Joe


Hello

On 2/14/07, Joe Byers <[hidden email]> wrote:

> All,
>
> I am trying to build the latest versions of Quantlib and Quantlib etc.  I am having trouble with ObjectHandler and QuantlibAddin.
> I have two problems.  My system is Linux RHEL4.  All src files are in /usr/local/src/QuantLib/.
>
> 1.
> When I run make clean and try to rebuild either application, I get the following error.
>
> [root@financialseal QuantLibAddin-0.3.14]# make
> Making all in gensrc
> make[1]: Entering directory `/usr/local/src/QuantLib/QuantLibAddin-0.3.14/gensrc'
> python scripts/gensrc.py -dqvl
> Traceback (most recent call last):
>   File "scripts/gensrc.py", line 22, in ?
>     import addinqla
> ImportError: No module named addinqla
> make[1]: *** [.time-stamp] Error 1
> make[1]: Leaving directory `/usr/local/src/QuantLib/QuantLibAddin-0.3.14/gensrc'
> make: *** [all-recursive] Error 1
>
> I have to delete the src files and re-extract the tar.gz file to get rid of this error.
>
> Any thoughts?

You need to set environment variables for gensrc as explained in the
gensrc installation doc
    http://www.gensrc.org/installation.html

> 2.
> When compiling QuantlibAddin I also get the following error
> couponvectors.cpp: In function `std::vector<std::vector<boost::any, std::allocator<boost::any> >, std::allocator<std::vector<boost::any, std::allocator<boost::any> > > > QuantLibAddin::flowAnalysis(QuantLibAddin::Leg)':
> couponvectors.cpp:76: error: `SimpleCashFlow' is not a member of `QuantLib'
> couponvectors.cpp:76: error: `SimpleCashFlow' is not a member of `QuantLib'
> couponvectors.cpp:76: error: template argument 1 is invalid
> couponvectors.cpp:76: error: invalid type in declaration before '=' token
> couponvectors.cpp:77: error: `SimpleCashFlow' is not a member of `QuantLib'
> couponvectors.cpp:77: error: `SimpleCashFlow' is not a member of `QuantLib'
> couponvectors.cpp:77: error: template argument 1 is invalid
> couponvectors.cpp:77: error: no matching function for call to `dynamic_pointer_cast(boost::shared_ptr<QuantLib::CashFlow>&)'
> make[2]: *** [couponvectors.lo] Error 1
> make[2]: Leaving directory `/usr/local/src/QuantLib/QuantLibAddin-0.3.14/qlo'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/usr/local/src/QuantLib/QuantLibAddin-0.3.14/qlo'
> make: *** [all-recursive] Error 1
>
> Addin finds the simplecashflows.hpp file but the Class does not seem to be compiled in the Quantlib 3.14 library.  I have recomplied Quantlib several time and do not know what to do.  This is similar to another post but it was for a Windows system.  I am working on a Linux system.

There was a problem with the use of Quantlib::SimpleCashFlow within
QuantLibAddin 0.3.13 on Windows but that's not the issue here.

Not sure, this problem didn't come up in the testing and packaging.
Are you sure you're picking up the QuantLib 0.3.14 header files?  Does
the declaration of Quantlib::SimpleCashFlow appear either indirectly
or directly among the #defines of couponvectors.cpp?

Regards,
Eric

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV





 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
-------------- next part --------------
An HTML attachment was scrubbed...
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users