Two question about array

Jarrett Billingsley kb3ctd2 at yahoo.com
Mon Dec 31 06:42:35 PST 2007


"Alex" <faint_u at 163.com> wrote in message 
news:flaqh4$14v7$1 at digitalmars.com...
> 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?

I've never used Phobos' std.variant, but it looks like a typical issue with 
DMD, OPTLINK, precompiled libraries and templates (that is, DMD+OPTLINK 
usually fall flat on their face when trying to use templates from a library 
that's been precompiled).  I don't know how to make it work :\ 




More information about the Digitalmars-d-learn mailing list