On Wed, Jul 31, 2019 at 08:47:42PM +0000, Andrey Zherikov via Digitalmars-d-learn wrote: > On Wednesday, 31 July 2019 at 20:16:01 UTC, H. S. Teoh wrote: > > On Wed, Jul 31, 2019 at 08:09:29PM +0000, Andrey Zherikov via > > Digitalmars-d-learn wrote: > > > I found a function that seems could be used for adding import paths: > > > dmd.frontend.addImport > > > (https://dlang.org/phobos/dmd_frontend.html#.addImport). But it's > > > not clear how can I use it: dmd directory is not added to lookup by > > > default and trying adding it gives errors: > > [...] > > > > That's because you can only call that function from inside dmd code. > > It's not available for user code to call. > > > > > > T > > I even suspect that dmd package which (I guess) is supposed to be "DMD > as a library" doesn't interact with DMD instance that is compiling the > code.
The dmd package is supposed to be for your application to compile D code at runtime. It has nothing to do with compile-time features like CTFE when compiling your application's own code. T -- What doesn't kill me makes me stranger.