linking in linux
Steven Schveighoffer
schveiguy at yahoo.com
Fri Sep 28 07:57:36 PDT 2007
"llee" <llee at goucher.edu> wrote in message
news:fdj3h4$m3j$1 at digitalmars.com...
>I wrote a test program to isolate the problem. The following program
>(program.d) calls a function named test_function() that is defined in
>test.d. test.d is displayed after it. When I try to compile the the program
>I receive an error.
>
> program.d:
> ------
> import test;
> void main ()
> {
> test_function ();
> }
>
> test.d:
> ------
>
> import std.cstream;
> void test_function ()
> {
> dout.writeLine ("test function called.");
> {
>
> Compilation:
> ------
> dmd program.d
try dmd program.d test.d
The linker can't find test.o because you didn't tell it to compile it.
-Steve
More information about the Digitalmars-d
mailing list