Import error
Carlo
carlo.lucibello at gmail.com
Thu Nov 11 04:44:22 PST 2010
Hi everyone,
i'm having trouble with the statement import. Here is an example:
//file ~/d/libtest.d
int fun(int x){
return x;
}
//endfile
//file ~/d/test.d
import std.stdio;
import libtest;
void main(){
writeln(fun(2));
}
//endfile
I issue the commands
#cd ~/d
#dmd test.d
and i get the error
test.d:(.text._Dmain+0x9): undefined reference to `_D7libtest3funFiZi'
collect2: ld returned 1 exit status
--- errorlevel 1
I have no troubles with standard libraries, just mine's. I have the dmd
2.0.50 compiler on a GNU/Linux 64bit system. Any idea?
More information about the Digitalmars-d-learn
mailing list