Re: ObjectHandler 1.5 and Quantlib Addin 3.14

Posted by eric ehlers on
URL: http://quantlib.414.s1.nabble.com/ObjectHandler-1-5-and-Quantlib-Addin-3-14-tp604p606.html

Hello,

Sorry that you're having trouble with this.

The 0.3.14 version of that file will be different from anything you
see on QuantLib CVS because there was a migration of the CVS
repository after the release.

Here's the file which I think ought to have shipped in the release:

http://quantlibaddin.cvs.sourceforge.net/quantlibaddin/QuantLibAddin/qlo/couponvectors.cpp?revision=1.34&view=markup&pathrev=R000314f0-branch

It's well likely that I messed something up, and as you pointed out
there was another message from someone else who may have had a similar
problem to yours.

Anyway.  If you edit the couponvectors.cpp that you got with 0.3.14,
and add any missing #includes, does that fix the problem?

Regards,
Eric

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

>
> 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.

-------------------------------------------------------------------------
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