Two question about array

Alex faint_u at 163.com
Mon Dec 31 08:27:08 PST 2007


The error occured with dmd 2.007. 
I just tried 2.008 and it works now. BTW, where is the download page for latest dmd compiler? The one in page http://www.digitalmars.com/d/dcompiler.html is still version 2.007. I replaced the 2.007 to 2.008 in the URL to get the correct version. But i think there should be a web page always listing the latest version.

Derek Parnell Wrote:

> On Mon, 31 Dec 2007 08:23:48 -0500, Alex wrote:
> 
> > I'm trying to use Variant but got error message with the following code:
> > -------------------------------------------
> > import std.variant;
> > 
> > void main()
> > {
> > 	Variant v;
> > 	v = 4;
> > }
> > 
> > -----------------------------
> > error message:
> > 
> > E:\Tools\Lang\D>dmd test.d
> > e:\Tools\Lang\d\dmd\bin\..\..\dm\bin\link.exe test,,,user32+kernel32/noi;
> > OPTLINK (R) for Win32  Release 8.00.1
> > Copyright (C) Digital Mars 1989-2004  All rights reserved.
> > test.obj(test)
> >  Error 42: Symbol Undefined _D3std7variant17__T8VariantNVk20Z8VariantN4typeMFZC8TypeInfo
> > test.obj(test)
> >  Error 42: Symbol Undefined _D3std7variant17__T8VariantNVk20Z8VariantN6__initZ
> > --- errorlevel 2
> > 
> > What's the problem?
> 
> Which version of the DMD comiler are you using?
> 
> When I tried your example with version 2.008 it worked...
> 
> ---------------
> C:\temp>type test.d
> import std.stdio;
> import std.variant;
> 
> void main()
> {
>         Variant v;
>         v = 4;
> 
>         writefln("%s", v);
> }
> C:\temp>dmd test.d
> c:\dmd\dmd\bin\..\..\dm\bin\link.exe test,,,user32+kernel32/noi;
> 
> C:\temp>test
> 4
> 
> C:\temp>dmd
> Digital Mars D Compiler v2.008
> 
> ----------------
> 
> -- 
> Derek Parnell
> Melbourne, Australia
> skype: derek.j.parnell



More information about the Digitalmars-d-learn mailing list