dummy main option (for use with --unittest)

dan via D.gnu d.gnu at puremagic.com
Tue Mar 21 12:17:53 PDT 2017


Is there some option for generating a dummy main with gdc?

Alexandrescu's book (p 133) mentions a '--main', but that doesn't 
seem to work for gdc, and i can't find one from 'gdc --help'.

The --unittest option does work, although, for whatever reason, 
you cannot just stick 'void main( ) { }' inside a unittest { } 
block.  (Or you can, but you won't get even a warning about 
conflicting symbols, so i suppose the name 'main' gets mangled 
somehow in this context.)

I'm using debian stretch, and thanks in advance for any clues.


More information about the D.gnu mailing list