No -c no main()

Daniel Keep daniel.keep.lists at gmail.com
Thu Mar 19 01:12:01 PDT 2009



Steve Teale wrote:
> Would it be a big deal to make the compiler recognize that there is no -c, but no instance of main() has been found, and say
> 
> "Link skipped - no main()"
> 
> instead of what you get if you do dmd mian.d on
> 
> import std.stdio;
> 
> void mian()
> {
>    writefln("Hello Wolrd");
> }

main might be linked in from another library/object on the command line.

dmd stuff.d unittest_main_stub.obj

You'd have to have the compiler crack open all .lib and .obj files and
look for a main.

  -- Daniel



More information about the Digitalmars-d mailing list