GHC Foreign hs_init/hs_add_root crashes
问题 I don't repeat more than necessary, brief summary: Following the Adder example from this tutorial on a machine with win7 (64) with VS 2010. But I don't use C++ but plain C. When using the cl (MS compiler) with cl /Zi (and no other flag) it works like expected. If not use /Zi and then try to execute the exe goes into flames. Why? (There must be some compiler/link options that make some init in the start of the haskell dll go wrong ) EDIT: Some investigation: /Zi does not affect optimizations.