Soren Van den berg
Soren Van den berg

Reputation: 55

Is there a directory where i can put a d file so that the compiler automatically includes it?

I am new to the D programming language, and would like to use ncurses in D. I have found a good D port of ncurses, but I want to be able to import it in any source file without writing:

gdc <files> ncurses.d

Is there any way I can make it included every time?

Btw I am using gdc on debian Gnu/Linux.

Upvotes: 1

Views: 94

Answers (1)

Vladimir Panteleev
Vladimir Panteleev

Reputation: 25187

No. You should consider using a build tool, such as rdmd, which will automatically construct a compiler's command line and add all modules included by your program.

If, for some reason, you don't want to use a build tool, a common approach is to use a Makefile.

Upvotes: 4

Related Questions