dmd compile with imported modules

useo useo at start.bg
Sat Jan 1 05:34:47 PST 2011


Hey guys,

I've the following problem... when I write a simple class, for
example:

...
module myclasses.exampleClass;

class exampleClass {
void writeHelloWorld() {
writeln("Hello World");
}

And import myclasses.exampleClass in the following:

...
module mainfile;

import myclasses.exampleClass;

void main(string[] args) {
exampleClass ec = new exampleClass();
ec.writeHelloWorld();
}
...

I always have to compile the mainfile-module with "dmd mainfile.d
myclasses/exampleClass.d" because of the obj-files. My projects are
always growing and I don't want list all 100 or more classes/files in
the command line. Is there any possibility to automatically import,
compile and link all the files with a short command?

Thanks in advance!


More information about the Digitalmars-d-learn mailing list