std::endl crashes Windows 8, compiled using MinGW

后端 未结 2 1071
孤独总比滥情好
孤独总比滥情好 2020-12-16 19:19

I have 3 computers, two of which use Windows 8. Using the latest version of MinGW\'s g++ (4.8.1-4) my hello world program freezes whenever I compile and run on the Windows 8

2条回答
  •  半阙折子戏
    2020-12-16 20:00

    I had the same issue and found after a long painful search that I had multiple versions of the mingw provided libstdc++-6.dll on my computer. One was part of the mingw installation the others were part of other installation packages (gnuplot and GIMP). As I had gnuplot in my PATH the compiled mingw exe it would use an older, incompatible version of this dll and crash with the described symptoms. I can, therefore, confirm Dietmar Kühl's suspicion. As suggested above linking the library statically obviously helps in this case as the library functions are included in the exe at compile time.

提交回复
热议问题