Library incompatibilty with Microsoft Runtime Library

Dear Rooters,

in an another thread it was mentioned that you have to use the “multi-threaded dll (/MD)” Flag, when you are using Microsofts Visual Studio 7.1 with ROOT Trees. This is because of incompatibilties with Microsoft Runtime Libraries.

Do you have to use this Flag also in all other Programs that are using ROOT Libraries?

I wrote a Program that is compiled with the “Single-threaded (/ML)” Flag, because it only has one thread. It is linked against the following ROOT Libraries:
It runs some time without crashing. But everyonce in a while it crashes. I can’t track down why and when it crashes. (Sometimes it runs for days and weeks without crashing, and sometimes it just keeps crashing every 5 minutes) So my question is, wether the mentioned incompatibility can be the reason for the program to crash.

Thank you,


yes, it can. Even though your program doesn’t use threads ROOT itself does. Linking against the root libs will cause threads to start, and the runtime lib incompatibility will probably kill your program.