SmartFAQ is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)
Changing .hpp files for experimenting in Quantlib/Dev C++/ Windows sometimes does not work.Is there a workaround?
Requested and Answered by Vanna on 31-Mar-2007 21:25 (1700 reads)
I noticed this problem when I tried adding a cout statement while changing FloatingRateCoupon.hpp file,eg:
inline Rate FloatingRateCoupon::rate() const {
Rate f = indexFixing();
std::cout << "inside FloatingRateCoupon::rate f=" << f << std::endl;
return gearing() * (f + convexityAdjustment(f)) + spread();
}
It never called the cout,even though everything compiled fine after I inserted the line.
It looks like the .hpp file compilation was actually ignored.
One fix for this I found was to add the following include in Cashflowvectors.cpp:
#include
after deleting the Cashflowvectors.o file in C:\Program Files\QuantLib-0.3.13\build\mingw, I could observe my change in code result.
NB: somebody may have a better idea, do post your suggestion!
inline Rate FloatingRateCoupon::rate() const {
Rate f = indexFixing();
std::cout << "inside FloatingRateCoupon::rate f=" << f << std::endl;
return gearing() * (f + convexityAdjustment(f)) + spread();
}
It never called the cout,even though everything compiled fine after I inserted the line.
It looks like the .hpp file compilation was actually ignored.
One fix for this I found was to add the following include in Cashflowvectors.cpp:
#include
after deleting the Cashflowvectors.o file in C:\Program Files\QuantLib-0.3.13\build\mingw, I could observe my change in code result.
NB: somebody may have a better idea, do post your suggestion!
Discuss or give feedback? Just enter your message and click on submit. No registration is required.
|
The comments are owned by the poster. We aren't responsible for their content.
|
Discuss or give feedback? Just enter your message and click on submit. No registration is required.

