I can't reproduce it on Windows 7 with dmd 2.050.<div><br><div class="gmail_quote">On Sat, Nov 20, 2010 at 12:45 AM, Tyro[a.c.edwards] <span dir="ltr"><<a href="mailto:nospam@home.com">nospam@home.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The following:<br>
<br>
import std.regex;<br>
<br>
void main()<br>
{<br>
        string s = "$,";<br>
        replace(s, regex("$",","), ""); // Is this possible?  If so, what is the propper way to do it?<br>
        assert(s == "", s);<br>
}<br>
<br>
Compiled with dmd.2.039, 042, 048, and 049 but yields a runtime error:<br>
D:\code>bug<br>
object.Exception: unrecognized attribute<br>
<br>
Compiled with dmd.2.050, it yields the linker error:<br>
D:\code>dmd bug<br>
OPTLINK (R) for Win32  Release 8.00.8<br>
Copyright (C) Digital Mars 1989-2010  All rights reserved.<br>
<a href="http://www.digitalmars.com/ctg/optlink.html" target="_blank">http://www.digitalmars.com/ctg/optlink.html</a><br>
bug.obj(bug)<br>
 Error 42: Symbol Undefined __d_throwc<br>
--- errorlevel 1<br>
<br>
I grepped my hard drive for _d_throwc and found the following:<br>
D:\code>grep -r -i _d_throwc d:\*.*<br>
\dmd2\linux\lib\libphobos2.a:_d_throwc<br>
\dmd2\linux\lib\libphobos2.a:.text._d_throwc<br>
\dmd2\linux\lib\libphobos2.a:.rel.text._d_throwc<br>
\dmd2\osx\lib\libphobos2.a:__d_throwc<br>
\dmd2\src\dmd\dmd.exe:_d_throwc<br>
\dmd2\src\dmd\rtlsym.obj:_d_throwc<br>
\dmd2\src\dmd\backend\rtlsym.h:SYMBOL_MARS(THROWC,          FLfunc,(mES | mBP),"_d_throwc", SFLexit, t) \<br>
\dmd2\src\druntime\deh.obj:__d_throwc..<br>
\dmd2\src\druntime\lib\druntime.lib:__d_throwc..<br>
\dmd2\src\druntime\lib\druntime.lib:__d_throwc.<br>
\dmd2\src\druntime\src\rt\deh.c:void _d_throwc(Object *h)<br>
\dmd2\src\druntime\src\rt\deh2.d:extern (C) void _d_throwc(Object *h)<br>
\dmd2\src\phobos\phobos.lib:__d_throwc..<br>
\dmd2\windows\bin\dmd.exe:_d_throwc<br>
<br>
Redundant entries were removed for brevity.<br>
<br>
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.<br>


<br>
Andrew<br>
</blockquote></div><br></div>