D - Trying to compile "hello.d"...
- Juan Carlos Arevalo Baeza (11/11) Jan 23 2002 Ahem... I found a bit of time to stop loitering around and try the al...
- Walter (12/23) Jan 23 2002 Try this:
- Juan Carlos Arevalo Baeza (14/23) Jan 23 2002 That's what "hello.d" contains. But it also has the following at the
- Walter (3/27) Jan 23 2002 I've been rewriting object.d and stdio.d. -Walter
- Juan Carlos Arevalo Baeza (7/13) Jan 23 2002 So? What has the one thing to do with the other? Am I missing a point
- Walter (5/17) Jan 23 2002 you
- John Fletcher (4/22) Jan 24 2002 I have similar problems. I just downloaded the latest alpha and have th...
- Juan Carlos Arevalo Baeza (12/30) Jan 24 2002 But the conflict was between object.printf and Object.printf! c.stdio...
Ahem... I found a bit of time to stop loitering around and try the alpha compiler out. This is how far I got: --- C:\dm\samples\d>dmd -IC:\dm\src\phobos hello.d D ALPHA Experimental release www.digitalmars.com C:\dm\src\phobos\object.d(2): printf symbol object.printf conflicts with Object.printf at C:\dm\src\phobos\Object.d(2) --- Salutaciones, JCAB
Jan 23 2002
Try this: int main(char[][] args) { printf("hello world\n"); printf("args.length = %d\n", args.length); for (int i = 0; i < args.length; i++) printf("args[%d] = '%s'\n", i, (char *)args[i]); return 0; } "Juan Carlos Arevalo Baeza" <jcab roningames.com> wrote in message news:a2nit0$2om4$1 digitaldaemon.com...Ahem... I found a bit of time to stop loitering around and try thealphacompiler out. This is how far I got: --- C:\dm\samples\d>dmd -IC:\dm\src\phobos hello.d D ALPHA Experimental release www.digitalmars.com C:\dm\src\phobos\object.d(2): printf symbol object.printf conflicts with Object.printf at C:\dm\src\phobos\Object.d(2) --- Salutaciones, JCAB
Jan 23 2002
"Walter" <walter digitalmars.com> wrote in message news:a2nodf$2s2j$2 digitaldaemon.com...Try this: int main(char[][] args) { printf("hello world\n"); printf("args.length = %d\n", args.length); for (int i = 0; i < args.length; i++) printf("args[%d] = '%s'\n", i, (char *)args[i]); return 0; }That's what "hello.d" contains. But it also has the following at the beginning: --- import Object; import c.stdio; --- which is indeed the problem. If I comment those two out, it works. I suggest you include this fix for the next release. So, what's happening? Is it automatically importing those, wether you want them or not? :-P Salutaciones, JCAB
Jan 23 2002
I've been rewriting object.d and stdio.d. -Walter "Juan Carlos Arevalo Baeza" <jcab roningames.com> wrote in message news:a2npsv$2t0f$1 digitaldaemon.com..."Walter" <walter digitalmars.com> wrote in message news:a2nodf$2s2j$2 digitaldaemon.com...Try this: int main(char[][] args) { printf("hello world\n"); printf("args.length = %d\n", args.length); for (int i = 0; i < args.length; i++) printf("args[%d] = '%s'\n", i, (char *)args[i]); return 0; }That's what "hello.d" contains. But it also has the following at the beginning: --- import Object; import c.stdio; --- which is indeed the problem. If I comment those two out, it works. I suggest you include this fix for the next release. So, what's happening? Is it automatically importing those, wether you want them or not? :-P Salutaciones, JCAB
Jan 23 2002
"Walter" <walter digitalmars.com> wrote in message news:a2nt3p$2v4f$1 digitaldaemon.com..."Juan Carlos Arevalo Baeza" <jcab roningames.com> wrote in message news:a2npsv$2t0f$1 digitaldaemon.com...So? What has the one thing to do with the other? Am I missing a point here? :-P Salutaciones, JCABSo, what's happening? Is it automatically importing those, wether you want them or not? :-PI've been rewriting object.d and stdio.d. -Walter
Jan 23 2002
"Juan Carlos Arevalo Baeza" <jcab roningames.com> wrote in message news:a2ntni$2vfp$1 digitaldaemon.com..."Walter" <walter digitalmars.com> wrote in message news:a2nt3p$2v4f$1 digitaldaemon.com...you"Juan Carlos Arevalo Baeza" <jcab roningames.com> wrote in message news:a2npsv$2t0f$1 digitaldaemon.com...So, what's happening? Is it automatically importing those, wetherIt has everything to do with the error message you got, that printf() was defined in both modules.So? What has the one thing to do with the other? Am I missing a point here?want them or not? :-PI've been rewriting object.d and stdio.d. -Walter
Jan 23 2002
Walter wrote:"Juan Carlos Arevalo Baeza" <jcab roningames.com> wrote in message news:a2ntni$2vfp$1 digitaldaemon.com...I have similar problems. I just downloaded the latest alpha and have these conflict messages running the sample code. John"Walter" <walter digitalmars.com> wrote in message news:a2nt3p$2v4f$1 digitaldaemon.com...you"Juan Carlos Arevalo Baeza" <jcab roningames.com> wrote in message news:a2npsv$2t0f$1 digitaldaemon.com...So, what's happening? Is it automatically importing those, wetherIt has everything to do with the error message you got, that printf() was defined in both modules.So? What has the one thing to do with the other? Am I missing a point here?want them or not? :-PI've been rewriting object.d and stdio.d. -Walter
Jan 24 2002
"Walter" <walter digitalmars.com> wrote in message news:a2ocm2$76r$1 digitaldaemon.com..."Juan Carlos Arevalo Baeza" <jcab roningames.com> wrote in message news:a2ntni$2vfp$1 digitaldaemon.com...But the conflict was between object.printf and Object.printf! c.stdio had nothing to do with it, AFAICS. And that does sound to me like a bug of some kind... And if I remove both imports, it seems to be able to find printf anyway... magically... Is that normal? My guess is that the compiler "introduces" an "import object;" statement before the source code begins. Then, the sample has a "import Object;" statement up top, and thus the problem: the same module is read twice. Salutaciones, JCAB"Walter" <walter digitalmars.com> wrote in message news:a2nt3p$2v4f$1 digitaldaemon.com...you"Juan Carlos Arevalo Baeza" <jcab roningames.com> wrote in message news:a2npsv$2t0f$1 digitaldaemon.com...So, what's happening? Is it automatically importing those, wetherIt has everything to do with the error message you got, that printf() was defined in both modules.So? What has the one thing to do with the other? Am I missing a point here?want them or not? :-PI've been rewriting object.d and stdio.d. -Walter
Jan 24 2002