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

后端 未结 5 2041
野性不改
野性不改 2021-02-15 05:20

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 05:40

    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.

提交回复
热议问题