Import function from module

John Demme me at
Sat Oct 14 17:44:20 PDT 2006

LW wrote:

> How do I use a function from another module in my main file without
> generating a library-file or using the second file as a parameter for
> dmd.exe?

dmd -c file1.d
dmd -c file2.d
gcc file1.o file2.o -o myapp

If gcc is not your linker, the last line will be different.

You have to compile each file, however- there's no getting around that.

~John Demme
me at

More information about the Digitalmars-d-learn mailing list