Hi Luigi, thanks very much for your answer. I send you my code example, it's very nice if you have time to have a look. I've tried your advice without success. Xavier (See attached file: zerocurve.cpp) Luigi Ballabio <[hidden email]> To: [hidden email], Sent by: [hidden email] [hidden email] cc: eforge.net Subject: Re: [Quantlib-users] problem to compile template with borland C++ 5.6 10/09/2002 16:09 At 02:57 PM 9/10/02 +0200, [hidden email] wrote: >then this call: > >Handle<RateHelper> d1y(new DepositRateHelper( > d1yQuote, 2, > 1, Years, calendar, ModifiedFollowing, depositDayCounter)); > >gives me the error: > >[C++ Error] Unit1.cpp(51): E2108 Improper use of typedef 'RateHelper' > >this call > >QuantLib::Handle<RateHelper> d1y(new DepositRateHelper( > d1yQuote, 2, > 1, Years, calendar, ModifiedFollowing, depositDayCounter)); > > >It compiles well but when I launch it there is a crash with an error: > "raised exception class EAccess Violation" First of all, I assume you are including "ql/quantlib.hpp", so that rate helpers are included as well. Now, the declaration above with all types fully specified should read: QuantLib::Handle<QuantLib::TermStructures::RateHelper> d1y( new QuantLib::TermStructures::DepositRateHelper( d1yQuote, 2, 1, QuantLib::Years, calendar, QuantLib::ModifiedFollowing, depositDayCounter)); You might remove some of the namespace specifications using "using" directives such as using QuantLib::TermStructures::RateHelper; the same applies to Calendar, TARGET, and any other QuantLib class. In short, make sure that the compiler knows in which namespace to find each class. If that doesn't help, I'll try to think of something else... Later, Luigi ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Quantlib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users ************************************************************************* Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La FIMAT et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. ******** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither FIMAT nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. ************************************************************************* zerocurve.cpp (2K) Download Attachment |
Free forum by Nabble | Edit this page |