Quote:
Originally Posted by youarefunny
This doesn't work for me. I get linking issues.
|
[We could move this over to another thread (or the digitalmars.D.learn newsgroup) if you'd like...]
That's odd, I do that all the time and it always works. Can you post what exactly you have, and your exact command line? (And which version of DMD and OS?) Also, try this:
Code:
$cat moduleA.d
import moduleB;
void main()
{
foo();
}
$cat moduleB.d
import std.stdio;
void foo()
{
writeln("Hello");
}
$rdmd --build-only -ofapp moduleA.d
$./app
Hello
If that doesn't work, then you may have some other problem, so make sure this works:
Code:
$dmd -ofapp moduleA.d moduleB.d
I just tried all that with the latest DMD (2.054), and it worked fine for me. Admittedly, I did it on windows since I don't have my linux box on at the moment, but I do that sort of thing all the time on linux, too (Ubuntu 10.04).