Bug in THtml

#include <THtml.h>
#include <Riostream.h>

int main()
{
cout << “This text doesn’t show up if THtml is included!!” << endl;
ofstream *stream = new ofstream(“x.txt”);
return 0;
}

When I run this code the cout statement is not written to the consol window.

The text gets written out when I either comment out the include of the THtml or comment out the new ofstream() statement.

I work with visual studio 2003 and root 50800.

Matthias

Hi,
I can reproduce this. I’ll try to figure out what’s happening there.
Axel.

Hi,
I was able to reproduce it building your code on the command line - I believe the reason was an incompatible C lib. Once I switched to the DevStudio the problem was gone. So maybe both of us suffered from a wrong build setting? Could you send me exact info so I can reproduce your build (command lines/Makefiles/VCProj etc)?
Axel.

Hi,

I made a new project and just added that code.
I send you the project file and the source file.

Matthias
htmlproblem.zip (1.8 KB)

Hi,

works for me. Note that I switched from /MDd to /MD in the compiler settings, asking for the C library which is compatible with the ROOT build. This might well be the problem.

Axel.
htmlproblem.zip (2.03 KB)