dummy main option (for use with --unittest)

kinke via D.gnu d.gnu at puremagic.com
Tue Mar 21 15:04:34 PDT 2017


On Tuesday, 21 March 2017 at 21:49:05 UTC, dan wrote:
> On Tuesday, 21 March 2017 at 21:36:39 UTC, kinke wrote:
>> On Tuesday, 21 March 2017 at 19:17:53 UTC, dan wrote:
>>> Is there some option for generating a dummy main with gdc?
>>
>> Here: 
>> http://forum.dlang.org/thread/mailman.974.1489320559.31550.digitalmars-d-learn@puremagic.com.
>
> And so recent too, good grief, the way i searched must be 
> really lousy.
>
> Thanks very much for pointing thous out Kinke!
>
> dan

You're welcome and don't worry, it was inappropriately in the 
'Lean' forum. ;)
You might as well just create a temporary source file with `void 
main() {}`, compile it once and then always link in this object 
when compiling the unittests, e.g., `gdc --unittest foo.d 
~/main.o && ./foo`.


More information about the D.gnu mailing list