开发者

GDC D2 Compile: undefined reference to `_Unwind_SjLj_XYZ'

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\libphobo开发者_开发问答s/../../../gcc-4.5.2/libphobos/std/stdio.d:454: undefined reference to `_Unwind_SjLj_Resume'
...

How do I fix this?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜