Thread overview |
---|
July 14, 2007 compile error on format.d | ||||
---|---|---|---|---|
| ||||
I'm trying DMD on Linux. I downloaded version 1.018 and installed on a Gentoo system by the instructions on prowiki http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/InstallingDCompiler When I try to compile a 6 lined hello world program, DMD returns /usr/local/lib/phobos/std/format.d(1463): found ':' when expecting ',' it repeats the exact same message (it appears twice). What did I do wrong? |
July 14, 2007 Re: compile error on format.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to acarion | acarion wrote:
> I'm trying DMD on Linux. I downloaded version 1.018 and installed on a Gentoo system by the instructions on prowiki http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/InstallingDCompiler
>
> When I try to compile a 6 lined hello world program, DMD returns
>
> /usr/local/lib/phobos/std/format.d(1463): found ':' when expecting ','
>
> it repeats the exact same message (it appears twice).
>
> What did I do wrong?
Line 1463 of format.d in phobos 1.018 looks like this:
char[5][int] aa = ([3:"hello", 4:"betty"]);
That suggests that your dmd version is older than 1.014, which is the first version officially supporting the AA literal syntax. Maybe 1.013 and 1.012 allowed it too, it was introduced gradually. Anyway, make sure you're using matching phobos and dmd versions.
|
July 15, 2007 Re: compile error on format.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to torhu | torhu Wrote:
> acarion wrote:
> > I'm trying DMD on Linux. I downloaded version 1.018 and installed on a Gentoo system by the instructions on prowiki http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/InstallingDCompiler
> >
> > When I try to compile a 6 lined hello world program, DMD returns
> >
> > /usr/local/lib/phobos/std/format.d(1463): found ':' when expecting ','
> >
> > it repeats the exact same message (it appears twice).
> >
> > What did I do wrong?
>
> Line 1463 of format.d in phobos 1.018 looks like this:
>
> char[5][int] aa = ([3:"hello", 4:"betty"]);
>
> That suggests that your dmd version is older than 1.014, which is the first version officially supporting the AA literal syntax. Maybe 1.013 and 1.012 allowed it too, it was introduced gradually. Anyway, make sure you're using matching phobos and dmd versions.
Turned out that I still had dmd 1.010 somewhere in the system, from Gentoo's "emerge dmd"
Thanks for the help!
|
Copyright © 1999-2021 by the D Language Foundation