I am trying to output some intermediate variable values in a program using the Quantlib C++ to a text file so that I can try to debug my code to see what's going on, and the way I set up my code is like this:
At the beginning of the method:
std::ofstream outfile ("C:\\temp\\MY DEBUG FILE", std::ofstream::out);
QL_TRACE_ON(outfile);
then at where I'd like to see the values printed out:
QL_TRACE(var1, var2, var3, ....) //many more variable here
and then towards the end:
outfile.close();
However every time I run through this code the text file is created however it contains nothing at all. (0 byte file)
I have also tried to do this at the beginning of the hpp:
#define QL_ENABLE_TRACING
And my already includes ql/quantlib.hpp which will in turn include the tracing hpp.
Is there something else I am missing here?