D seems interesting, but...

Alex Rønne Petersen alex at lycus.org
Sun Oct 14 23:43:54 PDT 2012


On 15-10-2012 08:40, H. S. Teoh wrote:
> On Sun, Oct 14, 2012 at 11:32:30PM -0700, H. S. Teoh wrote:
> [...]
>> In any case, I haven't been able to reproduce the problem you're seeing.
>> I tried installing the package multiple times, upgrading the system
>> libraries, etc., and everything still works for me, so I'm not sure what
>> else to say. Seems like there must be some specific combination of
>> libraries, system or otherwise, that makes dmd not work. Without being
>> able to examine your environment, it's really hard to tell.
> [...]
>
> Funny, as soon as I said that, I manage to reproduce the same error
> messages (though I can't say if it's exactly the problem you're seeing)
> by compiling a file that doesn't define main(). In this case, I had a
> hello.d with main() renamed to Main():
>
> 	import std.stdio;
>
> 	void Main() {
> 		writeln("haha");
> 	}
>
> Running `dmd hello.d` produced a whole bunch of errors almost exactly
> the same as what you're seeing.  Of course, I'm not sure this is exactly
> the problem you have, as your code does have a correctly-spelled main()
> (from what I can tell). But this may help find where the problem is.

Yep, those errors are always a sign that a proper main function is 
missing. I have no idea why you would get it otherwise, though.

>
> On that note, here's an enhancement request for dmd: if a program is
> missing main() for whatever reason, we really should have a more
> user-friendly error message than the reams of encrypted Klingon from the
> linker that almost nobody understands.

https://github.com/D-Programming-Language/dmd/pull/1178

>
>
> T
>

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d mailing list