On Tuesday, 15 March 2016 at 16:32:56 UTC, Chris wrote:
The error I get is something like
undefined reference to `_D3test7testmodule13A6__initZ'
undefined reference to `_D3test7testmodule13B6__initZ'
You still need to compile/link in the module (or in this specific
case, void initialize the structs) so any little functions or
initializers are present.
In C, structs need to be initialized manually, but in D they are
automatically set to some initial value for each field. That
initial value is the referenced __init symbol and still comes out
of the .o file, like a function would.