Hi everyone,
I have trouble building the lib with MS VC 2010 Compiler. I've tried the built-in conversion tool which worked on the vc2005 files (2008 did not). Now I'm getting a "unknown Microsoft compiler" error from quantlib-1.0.1\ql\config.msvc.hpp(93) Has anyone patched that for VC 2010 ? Or got it to work some other way ? I'm fairly new to windows programming, is there a way to tell vc to use the vc90 compiler ? Thanks, Alex ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi guys,
I am new in QuantLib, almost finishing the first integration of the lib in my code but with outstanding 4 linking problems (see below). I have not been able to solve by myself. Have you seen that before? any tip? Let me tell you a little bit about the context: debug mode compiles and linked without problemas All my solution's project as set with Multi-threaded DLL (/MD) and Multi-threaded Debug DLL (/MD) for Release and Debug mode respectivelly one of my .h includes: #include <ql/qldefines.hpp> #include <ql/auto_link.hpp> #include <ql/quantlib.hpp> my code is hibrid one, C/C++. which means that all my .h includes: #ifdef __cplusplus extern "C" { #endif Finally, test samples work fine when compiled and executed as available in the library. MANY THANKS for any help. 11>Linking... XXXX.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: virtual __thiscall QuantLib::Calendar::Impl::~Impl(void)" (??1Impl@Calendar@QuantLib@@UAE@XZ) XXXX.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::set<class QuantLib::Date,struct std::less<class QuantLib::Date>,class std::allocator<class QuantLib::Date> >::set<class QuantLib::Date,struct std::less<class QuantLib::Date>,class std::allocator<class QuantLib::Date> >(void)" (??0?$set@VDate@QuantLib@@U?$less@VDate@QuantLib@@@std@@V?$allocator@VDate@QuantLib@@@4@@std@@QAE@XZ) XXXX.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (__imp_?_Debug_message@std@@YAXPB_W0I@Z) referenced in function "public: void __thiscall std::_Iterator_base::_Orphan_me(void)" (?_Orphan_me@_Iterator_base@std@@QAEXXZ) XXXX.obj) : error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: bool __thiscall std::_Tree<class std::_Tset_traits<class QuantLib::Date,struct std::less<class QuantLib::Date>,class std::allocator<class QuantLib::Date>,0> >::const_iterator::operator==(class std::_Tree<class std::_Tset_traits<class QuantLib::Date,struct std::less<class QuantLib::Date>,class std::allocator<class QuantLib::Date>,0> >::const_iterator const &)const " (??8const_iterator@?$_Tree@V?$_Tset_traits@VDate@QuantLib@@U?$less@VDate@QuantLib@@@std@@V?$allocator@VDate@QuantLib@@@4@$0A@@std@@@std@@QBE_NABV012@@Z) 11>Release/Monitor.exe : fatal error LNK1120: 4 unresolved externals Este e-mail puede contener información privilegiada o confidencial y concierne únicamente a la persona a la que está dirigido. Si este mensaje no está dirigido a usted, por favor notifique al remitente, bórrelo y no lo lea, no actúe en base a él, no lo imprima, no lo divulgue, no lo copie, no lo retenga ni lo distribuya. En el siguiente link encontrará otros términos importantes relacionados con este e-mail: http://www.luminaamericas.com/email_terms.htm This E-mail may contain privileged or confidential information and it is intended only for the use of the named recipient. If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. In the following link you will find important additional terms related to this E-mail:http://www.luminaamericas.com/email_terms.htm ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Axel-46
Hi Axel; Axel schrieb: > Hi everyone, > > I have trouble building the lib with MS VC 2010 Compiler. > I've tried the built-in conversion tool which worked on the vc2005 files > (2008 did not). > Now I'm getting a "unknown Microsoft compiler" error from > quantlib-1.0.1\ql\config.msvc.hpp(93) > There has been an email about that issue, recently. You can google about that. > Has anyone patched that for VC 2010 ? Or got it to work some other way ? > Unfortunately msvc 2010 already supports c++ox, and it introuduces also its own shared_ptr. This results in name clash with boost::shared_ptr. HTH Kim > I'm fairly new to windows > programming, is there a way to tell vc to use the vc90 compiler ? > > Thanks, > Alex > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users > > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Mon, 2010-06-21 at 08:15 +0200, Kim Kuen Tang wrote:
> > Has anyone patched that for VC 2010 ? Or got it to work some other way ? > > > Unfortunately msvc 2010 already supports c++ox, and it introuduces also > its own shared_ptr. This results in name clash with boost::shared_ptr. No, it does not. That's what namespaces are for. Luigi -- The wisdom of the wise and the experience of the ages are perpetuated by quotations. -- Benjamin Disraeli ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Luigi Ballabio schrieb:
> On Mon, 2010-06-21 at 08:15 +0200, Kim Kuen Tang wrote: > >>> Has anyone patched that for VC 2010 ? Or got it to work some other way ? >>> >>> >> Unfortunately msvc 2010 already supports c++ox, and it introuduces also >> its own shared_ptr. This results in name clash with boost::shared_ptr. >> > > No, it does not. That's what namespaces are for. > msvc10. One error for example comes from the following piece of code (ql\methods\montecarlo\lsmbasissystem.cpp(119)) : std::vector<boost::function1<Real, Array> > ret; ret.push_back(bind(constant<Real, Real>(1.0), bind(f_workaround, _1, 0, dim))); Here bind was found by adl in the namespace std, while it also exists in namespace boost. This results in name clash. It is of course not difficult to correct the problem. You just need to add the namespace boost:: before bind. Btw, the same problem exists also for boost::ref. Kim > Luigi > > > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Tue, 2010-06-22 at 15:27 +0200, Kim Kuen Tang wrote:
> I recheck the error messages that i got when compiling ql1.0.1 with > msvc10. One error for example comes from the following piece of code > (ql\methods\montecarlo\lsmbasissystem.cpp(119)) : > > std::vector<boost::function1<Real, Array> > ret; > ret.push_back(bind(constant<Real, Real>(1.0), > bind(f_workaround, _1, 0, dim))); > > Here bind was found by adl in the namespace std, while it also exists > in > namespace boost. This results in name clash. It is of course not > difficult to correct the problem. You just need to add the namespace > boost:: before bind. > > Btw, the same problem exists also for boost::ref. Ok, I see. Did you manage to compile under VC2010? Do you have a set of patches I can apply? Luigi -- Prediction is very difficult, especially if it's about the future. -- Niels Bohr ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Axel-46
On Sun, 2010-06-20 at 01:32 +0200, Axel wrote:
> I have trouble building the lib with MS VC 2010 Compiler. > I've tried the built-in conversion tool which worked on the vc2005 files > (2008 did not). > Now I'm getting a "unknown Microsoft compiler" error from > quantlib-1.0.1\ql\config.msvc.hpp(93) > Has anyone patched that for VC 2010 ? Or got it to work some other way ? As far as I know, the code still doesn't work with VC2010. > I'm fairly new to windows > programming, is there a way to tell vc to use the vc90 compiler ? Opening the VC9 solution (that would be QuantLib_vc9.sln) should launch the right version of the compiler. Otherwise, open the VC9 IDE and open the solution from within that. Luigi -- A programming language is low-level when its programs require attention to the irrelevant. -- Alan Perlis ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Lucio Dinoto
On Mon, 2010-06-21 at 02:56 -0300, Lucio Dinoto wrote:
> I am new in QuantLib, almost finishing the first integration of the > lib in my code but with outstanding 4 linking problems (see below). I > have not been able to solve by myself. Lucio, what version of Visual Studio are you using? Luigi -- The First Rule of Optimization: Don't do it. The Second Rule of Optimization (For experts only): Don't do it yet. -- Michael Jackson ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Luigi,
My version is: Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) Microsoft .NET Framework Version 2.0.50727 SP2 Installed Edition: VC Express Microsoft Visual C++ 2005 76542-000-0000011-00125 Microsoft Visual C++ 2005 Thanks -----Original Message----- From: Luigi Ballabio [mailto:[hidden email]] Sent: Thursday, June 24, 2010 12:06 PM To: Lucio Dinoto Cc: [hidden email] Subject: Re: [Quantlib-users] problem linking quantlib - help On Mon, 2010-06-21 at 02:56 -0300, Lucio Dinoto wrote: > I am new in QuantLib, almost finishing the first integration of the > lib in my code but with outstanding 4 linking problems (see below). I > have not been able to solve by myself. Lucio, what version of Visual Studio are you using? Luigi -- The First Rule of Optimization: Don't do it. The Second Rule of Optimization (For experts only): Don't do it yet. -- Michael Jackson Este e-mail puede contener información privilegiada o confidencial y concierne únicamente a la persona a la que está dirigido. Si este mensaje no está dirigido a usted, por favor notifique al remitente, bórrelo y no lo lea, no actúe en base a él, no lo imprima, no lo divulgue, no lo copie, no lo retenga ni lo distribuya. En el siguiente link encontrará otros términos importantes relacionados con este e-mail: http://www.luminaamericas.com/email_terms.htm This E-mail may contain privileged or confidential information and it is intended only for the use of the named recipient. If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. In the following link you will find important additional terms related to this E-mail:http://www.luminaamericas.com/email_terms.htm ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Guys,
I have found that by creating a simple schedule as following: QuantLib::Schedule schedule = QuantLib::Schedule (dates, QuantLib::NullCalendar(), QuantLib::Unadjusted); The lib fails after: QuantLib::FixedRateLeg(schedule) As the isRegular was never initialized. I think the solution could be to initialize in the constructor: Schedule(const std::vector<Date>&, const Calendar& calendar = NullCalendar(), BusinessDayConvention convention = Unadjusted); ERROR: FixedRateLeg::operator Leg() const { QL_REQUIRE(!couponRates_.empty(), "no coupon rates given"); QL_REQUIRE(!notionals_.empty(), "no notional given"); Leg leg; // the following is not always correct Calendar calendar = schedule_.calendar(); // first period might be short or long Date start = schedule_.date(0), end = schedule_.date(1); Date paymentDate = calendar.adjust(end, paymentAdjustment_); InterestRate rate = couponRates_[0]; Real nominal = notionals_[0]; ---->>>> if (schedule_.isRegular(1)) { Este e-mail puede contener información privilegiada o confidencial y concierne únicamente a la persona a la que está dirigido. Si este mensaje no está dirigido a usted, por favor notifique al remitente, bórrelo y no lo lea, no actúe en base a él, no lo imprima, no lo divulgue, no lo copie, no lo retenga ni lo distribuya. En el siguiente link encontrará otros términos importantes relacionados con este e-mail: http://www.luminaamericas.com/email_terms.htm This E-mail may contain privileged or confidential information and it is intended only for the use of the named recipient. If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. In the following link you will find important additional terms related to this E-mail:http://www.luminaamericas.com/email_terms.htm ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Luigi Ballabio
there are some interesting remarks in
http://www.wilmott.com/messageview.cfm?catid=10&threadid=77900 //Lutz Am 23.06.2010 17:52, schrieb Luigi Ballabio: > On Tue, 2010-06-22 at 15:27 +0200, Kim Kuen Tang wrote: > >> I recheck the error messages that i got when compiling ql1.0.1 with >> msvc10. One error for example comes from the following piece of code >> (ql\methods\montecarlo\lsmbasissystem.cpp(119)) : >> >> std::vector<boost::function1<Real, Array> > ret; >> ret.push_back(bind(constant<Real, Real>(1.0), >> bind(f_workaround, _1, 0, dim))); >> >> Here bind was found by adl in the namespace std, while it also exists >> in >> namespace boost. This results in name clash. It is of course not >> difficult to correct the problem. You just need to add the namespace >> boost:: before bind. >> >> Btw, the same problem exists also for boost::ref. >> > Ok, I see. Did you manage to compile under VC2010? Do you have a set of > patches I can apply? > > Luigi > > > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Lucio Dinoto
Guys,
We have to build plain vanilla, regular schedules for swaps with the particularity of having LONG front or back stubs, which means the first or last coupon could be potentially larger than the other ones, merging first (last) short coupon with next (previoys) one. Any recommendation or sample? Many thanks Lucio Este e-mail puede contener información privilegiada o confidencial y concierne únicamente a la persona a la que está dirigido. Si este mensaje no está dirigido a usted, por favor notifique al remitente, bórrelo y no lo lea, no actúe en base a él, no lo imprima, no lo divulgue, no lo copie, no lo retenga ni lo distribuya. En el siguiente link encontrará otros términos importantes relacionados con este e-mail: http://www.luminaamericas.com/email_terms.htm This E-mail may contain privileged or confidential information and it is intended only for the use of the named recipient. If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. In the following link you will find important additional terms related to this E-mail:http://www.luminaamericas.com/email_terms.htm ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Luigi Ballabio
Hi Luigi and others,
Just FYI, I finally got to get rid of the linking problems by removing from "Ignore Specific Libraries" the following files: msvcprtd.lib;msvcrtd.lib; May be it could help others facing with the same problem in the future. Cheers Lucio -----Original Message----- From: Lucio Dinoto Sent: Thursday, June 24, 2010 2:03 PM To: '[hidden email]' Cc: [hidden email] Subject: RE: [Quantlib-users] problem linking quantlib - help Hi Luigi, My version is: Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) Microsoft .NET Framework Version 2.0.50727 SP2 Installed Edition: VC Express Microsoft Visual C++ 2005 76542-000-0000011-00125 Microsoft Visual C++ 2005 Thanks -----Original Message----- From: Luigi Ballabio [mailto:[hidden email]] Sent: Thursday, June 24, 2010 12:06 PM To: Lucio Dinoto Cc: [hidden email] Subject: Re: [Quantlib-users] problem linking quantlib - help On Mon, 2010-06-21 at 02:56 -0300, Lucio Dinoto wrote: > I am new in QuantLib, almost finishing the first integration of the > lib in my code but with outstanding 4 linking problems (see below). I > have not been able to solve by myself. Lucio, what version of Visual Studio are you using? Luigi -- The First Rule of Optimization: Don't do it. The Second Rule of Optimization (For experts only): Don't do it yet. -- Michael Jackson Este e-mail puede contener información privilegiada o confidencial y concierne únicamente a la persona a la que está dirigido. Si este mensaje no está dirigido a usted, por favor notifique al remitente, bórrelo y no lo lea, no actúe en base a él, no lo imprima, no lo divulgue, no lo copie, no lo retenga ni lo distribuya. En el siguiente link encontrará otros términos importantes relacionados con este e-mail: http://www.luminaamericas.com/email_terms.htm This E-mail may contain privileged or confidential information and it is intended only for the use of the named recipient. If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. In the following link you will find important additional terms related to this E-mail:http://www.luminaamericas.com/email_terms.htm ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Wed, 2010-07-07 at 15:02 -0300, Lucio Dinoto wrote:
> Hi Luigi and others, > > Just FYI, I finally got to get rid of the linking problems by removing from "Ignore Specific Libraries" the following files: > msvcprtd.lib;msvcrtd.lib; > May be it could help others facing with the same problem in the future. Ok, thanks. I'll fix the projects for the next release. Luigi -- All generalizations are false, including this one. -- Mark Twain ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Lucio Dinoto
On Fri, 2010-06-25 at 07:17 -0300, Lucio Dinoto wrote:
> I have found that by creating a simple schedule as following: > > QuantLib::Schedule schedule = QuantLib::Schedule (dates, QuantLib::NullCalendar(), QuantLib::Unadjusted); > > The lib fails after: > > QuantLib::FixedRateLeg(schedule) > > As the isRegular was never initialized. I think the solution could be > to initialize in the constructor Not really a solution, since the schedule would still be missing information that FixedRateLeg would request after the isRegular check. I think the solution should be to add a constructor that sets all the Schedule data members besides the dates. Would you have time to try and code it? Luigi -- Olmstead's Law: After all is said and done, a hell of a lot more is said than done. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Lucio Dinoto
On Wed, 2010-06-30 at 04:11 -0300, Lucio Dinoto wrote:
> We have to build plain vanilla, regular schedules for swaps with the > particularity of having LONG front or back stubs, which means the > first or last coupon could be potentially larger than the other ones, > merging first (last) short coupon with next (previoys) one. Any > recommendation or sample? Passing a first date or a next-to-last date to the schedule should work as the dates are concerned. For instance, for a long first coupon, passing a first date will cause the schedule to skip the regular date and put the passed first date into dates[1]. I'm not sure about accrual, though. Are there any particular rules for compounding the interest over the long coupon, or it's just a rate accrued for the length of the coupon? Luigi -- Dealing with failure is easy: work hard to improve. Success is also easy to handle: you've solved the wrong problem. Work hard to improve. -- Alan Perlis ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |