GDC D2 编译:对“_Unwind_SjLj_XYZ”的未定义引用

发布于 2024-11-27 05:33:37 字数 2228 浏览 1 评论 0原文

我刚刚下载了 GDC (gcc-4.5.2-tdm-1-gdc-r575-20110723.zip) 与 MinGW-w32 一起使用,并在尝试编译/链接文件时,出现以下错误:

C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:167: undefined reference to `_Unwind_SjLj_RaiseException'
c:/mingw-w32/bin/../lib/gcc/mingw32/4.5.2/../../..\libgphobos2.a(deh.o): In function `D3gcc3deh17parse_lsda_headerFPS3gcc14unwind_generic15_Unwind_ContextPhPS3gcc3deh16lsda_header_infoZPh':
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:546: undefined reference to `_Unwind_GetRegionStart'
c:/mingw-w32/bin/../lib/gcc/mingw32/4.5.2/../../..\libgphobos2.a(deh.o): In function `D3gcc3deh15personalityImplFiT3gcc14unwind_generic14_Unwind_ActionbPS3gcc14unwind_generic17_Unwind_ExceptionPS3gcc14unwind_generic15_Unwind_ContextZk':
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:294: undefined reference to `_Unwind_GetLanguageSpecificData'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:308: undefined reference to `_Unwind_GetIP'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:516: undefined reference to `_Unwind_SetGR'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:521: undefined reference to `_Unwind_SetGR'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:523: undefined reference to `_Unwind_SetIP'
c:/mingw-w32/bin/../lib/gcc/mingw32/4.5.2/../../..\libgphobos2.a(stdio.o): In function `D3std5stdio4File5closeMFZv':
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/std/stdio.d:441: undefined reference to `_Unwind_SjLj_Register'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/std/stdio.d:454: undefined reference to `_Unwind_SjLj_Unregister'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/std/stdio.d:446: undefined reference to `_Unwind_SjLj_Unregister'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/std/stdio.d:454: undefined reference to `_Unwind_SjLj_Resume'
...

如何修复此问题?

I just downloaded GDC (gcc-4.5.2-tdm-1-gdc-r575-20110723.zip) to use with MinGW-w32, and upon trying to compile/link a file, I got these errors:

C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:167: undefined reference to `_Unwind_SjLj_RaiseException'
c:/mingw-w32/bin/../lib/gcc/mingw32/4.5.2/../../..\libgphobos2.a(deh.o): In function `D3gcc3deh17parse_lsda_headerFPS3gcc14unwind_generic15_Unwind_ContextPhPS3gcc3deh16lsda_header_infoZPh':
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:546: undefined reference to `_Unwind_GetRegionStart'
c:/mingw-w32/bin/../lib/gcc/mingw32/4.5.2/../../..\libgphobos2.a(deh.o): In function `D3gcc3deh15personalityImplFiT3gcc14unwind_generic14_Unwind_ActionbPS3gcc14unwind_generic17_Unwind_ExceptionPS3gcc14unwind_generic15_Unwind_ContextZk':
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:294: undefined reference to `_Unwind_GetLanguageSpecificData'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:308: undefined reference to `_Unwind_GetIP'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:516: undefined reference to `_Unwind_SetGR'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:521: undefined reference to `_Unwind_SetGR'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/gcc/deh.d:523: undefined reference to `_Unwind_SetIP'
c:/mingw-w32/bin/../lib/gcc/mingw32/4.5.2/../../..\libgphobos2.a(stdio.o): In function `D3std5stdio4File5closeMFZv':
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/std/stdio.d:441: undefined reference to `_Unwind_SjLj_Register'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/std/stdio.d:454: undefined reference to `_Unwind_SjLj_Unregister'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/std/stdio.d:446: undefined reference to `_Unwind_SjLj_Unregister'
C:\crossdev\gdc\v2\build\mingw32\libphobos/../../../gcc-4.5.2/libphobos/std/stdio.d:454: undefined reference to `_Unwind_SjLj_Resume'
...

How do I fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半世蒼涼 2024-12-04 05:33:37

Mehrdad,看起来 TDM 的 GDC 包是使用 --enable-sjlj-exceptions 标志构建的,但是您的 GCC 是官方 MinGW,并且它可能不是使用(过时的)SJLJ 异常处理构建的。互联网上有一个“普通”GDC 软件包,我建议您尝试一下。

Mehrdad, it looks like TDM's GDC package is built with --enable-sjlj-exceptions flag, but your GCC is the official MinGW, and it is probably not build with (obsolete) SJLJ exception handling. There is a "normal" GDC package available on the Internet, I suggest you try that one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文