http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52540
--- Comment #8 from Pawel Sikora <pluto at agmk dot net> 2012-03-10 13:16:45 UTC --- i've compared the .ii files with and without _GLIBCXX_DEBUG definition. the debug version doesn't contain 'extern template (...)' for some classes. i suppose there're odr violations (global locale objects?) in debug mode. it may work on linux due to elf's weak binding feature but explicit dllimport/export exposes problem on windows.