Error 42: Symbol Undefined __d_throwc

Jimmy Cao jcao219 at gmail.com
Sat Nov 20 08:13:19 PST 2010


I can't reproduce it on Windows 7 with dmd 2.050.

On Sat, Nov 20, 2010 at 12:45 AM, Tyro[a.c.edwards] <nospam at home.com> wrote:

> The following:
>
> import std.regex;
>
> void main()
> {
>        string s = "$,";
>        replace(s, regex("$",","), ""); // Is this possible?  If so, what is
> the propper way to do it?
>        assert(s == "", s);
> }
>
> Compiled with dmd.2.039, 042, 048, and 049 but yields a runtime error:
> D:\code>bug
> object.Exception: unrecognized attribute
>
> Compiled with dmd.2.050, it yields the linker error:
> D:\code>dmd bug
> OPTLINK (R) for Win32  Release 8.00.8
> Copyright (C) Digital Mars 1989-2010  All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> bug.obj(bug)
>  Error 42: Symbol Undefined __d_throwc
> --- errorlevel 1
>
> I grepped my hard drive for _d_throwc and found the following:
> D:\code>grep -r -i _d_throwc d:\*.*
> \dmd2\linux\lib\libphobos2.a:_d_throwc
> \dmd2\linux\lib\libphobos2.a:.text._d_throwc
> \dmd2\linux\lib\libphobos2.a:.rel.text._d_throwc
> \dmd2\osx\lib\libphobos2.a:__d_throwc
> \dmd2\src\dmd\dmd.exe:_d_throwc
> \dmd2\src\dmd\rtlsym.obj:_d_throwc
> \dmd2\src\dmd\backend\rtlsym.h:SYMBOL_MARS(THROWC,          FLfunc,(mES |
> mBP),"_d_throwc", SFLexit, t) \
> \dmd2\src\druntime\deh.obj:__d_throwc..
> \dmd2\src\druntime\lib\druntime.lib:__d_throwc..
> \dmd2\src\druntime\lib\druntime.lib:__d_throwc.
> \dmd2\src\druntime\src\rt\deh.c:void _d_throwc(Object *h)
> \dmd2\src\druntime\src\rt\deh2.d:extern (C) void _d_throwc(Object *h)
> \dmd2\src\phobos\phobos.lib:__d_throwc..
> \dmd2\windows\bin\dmd.exe:_d_throwc
>
> Redundant entries were removed for brevity.
>
> Function _d_throwc is defined on line 152 of
> dmd2\src\druntime\src\rt\deh2.d and line 232 of
> dmd2\src\druntime\src\rt\deh.d. I do not know how to correct the problem
> however it does seem odd that Linux's libphobos2.a uses the same name as was
> originally defined "_d_throwc" while OSX's libphobos2.a, druntime.lib and
> phobos.lib are different. Note that this function did not exist prior to
> dmd.2.050. Don't know if it matters but I'm using Win7. Any assistance is
> appreciated.
>
> Andrew
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101120/5ee8f91a/attachment.html>


More information about the Digitalmars-d mailing list