No -c no main()

Steve Teale steve.teale at britseyeview.com
Thu Mar 19 02:00:00 PDT 2009


Daniel Keep Wrote:

> 
> 
> 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

True, but maybe if there were only .d files?




More information about the Digitalmars-d mailing list