Hi Andreas, I can not reproduce this problem. However (due to your use of 'main'), I assume that you are linking your own executable. Windows is very sensitive (and not likely to warn you) about library mis-match. Retry you exaxmple using ACLiC. Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Andreas Zoglauer Sent: Thursday, March 04, 2004 1:17 PM To: roottalk@pcroot.cern.ch Subject: [ROOT] Different behaviour (i.e. Crash) of TString on Linux and Windows Hello, The following little program has different behaviour on windows and on Linux: #include <iostream> using namespace std; #include "TString.h" int main() { TString W = "Hello World"; cout<<W<<endl; return 0; } On Linux, the output is of course: Hello, World! But on Windows I get a Crash (access violation)!! Wenn I replace <iostream> with <Riostream.h> I also crashes on Windows. There is no crash when I replace cout<<W<<endl; with cout<<W.Data()<<endl; Unfortunately I am no Windows expert, so I cannot debug ROOT on Windows, but if I should guess, it might be a problem in ostream& <<operator of TString?? I am using ROOT v4.00/02 win32gdk with Visual C++ 6.0 SP3 Ciao, Andreas Zoglauer
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET