std.boxer problem

John Demme me at teqdruid.com
Sat Apr 29 09:56:08 PDT 2006


Tydr Schnubbis wrote:

> Alexander Panek wrote:
>> Tydr Schnubbis wrote:
>>> Why can't I cast from Object to Box?  That seems to defeat the purpose
>>> of boxing.  I get this error:
>>> 
>>> serverlist.d(185): e2ir: cannot cast from object.Object to Box
>>> Internal error: e2ir.c 267
>> 
>> Object o = new Object();
>> Box b = box(o);
>> 
>> foo bar = unbox!(foo)(b);
>> 
> No luck.
> 
> 
> import std.boxer;
> 
> void main()
> {
>      Object o = new Object();
>      Box b = box(o);
> 
>      int bar = unbox!(int)(b);
> }
> 
> c:\prog\test\D>dmd boxing2.d
> c:\prog\dmd\bin\..\..\dm\bin\link.exe boxing2,,,user32+kernel32/noi;
> OPTLINK (R) for Win32  Release 7.50B1
> Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
> 
> boxing2.obj(boxing2)
>   Error 42: Symbol Undefined _assert_3std5boxer
> --- errorlevel 1
> 
> 
> --------
> Maybe it's just a configuration problem?  I've got dmd 0.155.

That one's a bug with templating code inside of libraries.  You need to
compile your code with -release.

~John Demme



More information about the Digitalmars-d mailing list