View previous topic :: View next topic |
Author |
Message |
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Fri Mar 11, 2005 8:10 pm Post subject: Linking my own libraries... |
|
|
So I have this in my directory:
03/11/2005 08:35 PM 236 jic.d
03/11/2005 08:35 PM 145 month.d
File jic.d contains:
module jic;
private import std.string;
char[] CallMe(char[] mon)
{
char[] mm = "CallMe " ~ mon;
return(mm);
}
char[] CallMeToo(char[] mon)
{
char[] mm = "CallMeToo " ~ mon;
return(mm);
}
while file month.d contains:
import std.stdio;
import jic;
void main (char[][] args)
{
char[] d;
writefln(jic.CallMe("Jan"));
writefln(jic.CallMeToo("Feb"));
}
when I compile month.d, I get:
20:49:38.41>dmd month.d
c:\dmd\bin\..\..\dm\bin\link.exe month,,,user32+kernel32/noi;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
month.obj(month)
Error 42: Symbol Undefined _D3jic6CallMeFAaZAa
month.obj(month)
Error 42: Symbol Undefined _D3jic9CallMeTooFAaZAa
--- errorlevel 2
Huh?
Any help would be greatly appreciated.
thanks.
jic |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sat Mar 12, 2005 9:13 pm Post subject: Re: Linking my own libraries... |
|
|
jicman wrote: | 20:49:38.41>dmd month.d
c:\dmd\bin\..\..\dm\bin\link.exe month,,,user32+kernel32/noi;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
month.obj(month)
Error 42: Symbol Undefined _D3jic6CallMeFAaZAa
month.obj(month)
Error 42: Symbol Undefined _D3jic9CallMeTooFAaZAa
--- errorlevel 2 |
It's a common thing that D beginners run into. Don't feel bad about it. (It should be documented somewhere, but I suspect it's not.)
Either one of these methods should work:
Code: | dmd jic.d
dmd month.d jic.obj | or |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Sun Mar 13, 2005 3:00 am Post subject: |
|
|
Yeah... I don't think it's documented somewhere... Now it is. :-)
thanks.
josé |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sun Mar 13, 2005 6:08 pm Post subject: |
|
|
jicman wrote: | Yeah... I don't think it's documented somewhere... Now it is. | And I also added it to the ErrorMessages page at Wiki4D.
You're quite welcome. |
|
Back to top |
|
|
|