Importing local modules in C style
via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jun 26 04:27:20 PDT 2015
On Thursday, 25 June 2015 at 13:57:35 UTC, Binarydepth wrote:
> I want to import a module from my local project in C style
> (#include "local.h").
You can theoretically do this with `mixin(import("local.d"));`.
This will more or less copy-paste the content of local.d into the
current scope. You also need to pass `-J.` to the compiler to
allow it to read the file.
But I would try to make it work with normal imports instead.
More information about the Digitalmars-d-learn
mailing list