How does SFML use std:: throughout its libraries while being DLL safe?
I keep reading that if the DLL is linked against another version of the runtime that doesn't match the other modules using it开发者_开发问答 and it returns a std:: object or one of its classes has std:: arguments, it will cause the program to crash. How does SFML do it then? I do not see any warnings about this anywhere and they heavily use std:: ..
http://www.sfml-dev.org
Thanks
In theory, there are no guarantees of interoperability between different C++ runtimes, not even between different releases of the same compiler. And it seems that SFML releases separate Windows library downloads for VC++ 2005, VC++ 2008, and MinGW.
But to say that mixing different runtimes will cause a crash is an exaggeration. If compiler vendors didn't maintain some reasonable level of interoperability (for example, between minor patches to major compiler releases), their customers would run for the hills, or at least they would if they had a lick of sense!
精彩评论