No main() Error

Ron Tarrant rontarrant at gmail.com
Wed Feb 5 08:48:32 UTC 2025


On Wednesday, 5 February 2025 at 05:34:09 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
>
> What you are asking for is a nice customized error message for 
> D.
>
> Which as far as I'm aware is not supported by any linker.

So, what you're saying is that DMD doesn't have its own linker? 
That never occurred to me.

On the other hand, if D uses a linker previously built for other 
compilers (C or C++, I assume) I'm surprised that this 
already-existing linker doesn't have such an error message.

On the other-other hand, if linkers are used for building both 
executables and libraries, it does make sense in a way. I mean, 
otherwise the linker developer would have to allow for a command 
line switch telling the linker the specific output of the build: 
library, or executable.

But this now sounds like a discussion for another venue. Not sure 
which, so instead, I'm going to write up a little note to post on 
my monitor bezel, something like:

Does your code have a main() function?

I guess that will have to do. Thanks for the discussion, guys. 
It's been fun.


More information about the dip.ideas mailing list