hello all
I'm begining to learn to program with D.
I've made this tiny module written in file truc.d
module
module truc;
double carre(double x){
return x*x;
}
/module
and this tiny program written in file jeteste.d
prgm
import truc; // I've also tried import T = truc;
import std.stdio;
On Tuesday, 26 June 2012 at 17:14:07 UTC, Jesse Phillips wrote:
On Tuesday, 26 June 2012 at 16:55:56 UTC, le TeXnicien de
surface wrote:
and I obtain this message:
jeteste.o: In function `_Dmain':
jeteste.d:(.text._Dmain+0x1e): undefined reference to
`_D4truc5carreFdZd'
collect2: ld
On Tuesday, 26 June 2012 at 19:50:15 UTC, Graham Fawcett wrote:
You should also be able to do this:
rdmd --build-only jeteste.d
Normally, the rdmd tool will compile and immediately execute
the jeteste program. Rdmd is smarter than dmd, because it
will calculate all the files that you need