Closed wdx04 closed 9 years ago
Hi, do you have a working directory created, where log file is placed?
Yes, I can confirm the log file is created, and if I comment out the BOOT_ASSERT line and recompile, the log will be written to the log file correctly. Also I noticed result1 = 0 means std::cout is the stream being buffered, not the log file stream.
I have Boost 1.56 installed locally and have no such problems running debug version built by MSVC 2013. Also I don't see why iostreams::write should return 0 even if the underlying stream is buffered.
Do you have any output to console when you are debugging the app?
I'm creating a Windows GUI application so there is no console.
Ok, this is the reason. Will you survive without permament fix for ~2 months? I am doing a major nnforge redesign now, would like to fix the issue afterwards.
No problem. Thanks.
In stream_duplicator constructor, the first cout output statement causes assertion failure in boost/iostreams/tee.hpp, line 176(I'm using Boost 1.57, Visual C++ 2013).
I placed a breakpoint on the BOOST_ASSERT line and got result1: 0, result2: 41, n: 41 in the debugger window. This is probably because outputs to the log file is buffered and not flushed before iostreams::write returns. In Release mode cout is correctly redirected to the log file.
Please consider using freopen function to redirect standard output to a file.