www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - compile error on format.d

reply acarion <acar mn.d> writes:
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?
Jul 14 2007
parent reply torhu <no spam.invalid> writes:
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.
Jul 14 2007
parent acarion <acar asq.pt> writes:
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!
Jul 15 2007