What    |Removed                     |Added
                 CC|                            |

------- Comment #3 from  2009-03-28 23:16 -------
(In reply to comment #1)
> I thought some more about this, and there's a problem. A module may not have a
> main(), but it may reference another function in a library that does have a
> main().

I think this is an important use-case.

More specifically, things like WinMain(), etc.  DMD doesn't special-case those
for you, so it's likely a framework/toolkit might write your WinMain for you
and give you a D function to hook in.  Although I'd do that with a template,

The best solution would be altering the linker, just so slightly, to output an
easier to understand message than "no start address."  As exactly correct as
this message may be, programmers more interested in application programming
than systems programming may be very perplexed.

That said, the most common case is when compiling with new libs - just the
default.  Maybe a solution is to show this error whenever no libs are passed
in, and add a switch (beside defaultlib) to suppress the error for other
default libraries?  It is only to improve documentation, after all.



Reply via email to