What does the following runtime error mean: “terminate called without an active exception\n Aborted”

后端 未结 5 1382
伪装坚强ぢ
伪装坚强ぢ 2021-02-15 07:15

The bug disturbed me about two days: when running the code I have a runtime error of \"terminate called without an active exception\\n Aborted\",why?

I try to locate the

5条回答
  •  被撕碎了的回忆
    2021-02-15 07:41

    With MinGW, adding the -mthreads compiler option to gcc solves this problem.

    From the gcc manual:

    -mthreads

    Support thread-safe exception handling on Mingw32. Code that relies on thread-safe exception handling must compile and link all code with the -mthreads option. When compiling, -mthreads defines -D_MT; when linking, it links in a special thread helper library -lmingwthrd which cleans up per thread exception handling data.

提交回复
热议问题