FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Linking my own libraries...

 
Post new topic   Reply to topic     Forum Index -> General
View previous topic :: View next topic  
Author Message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Fri Mar 11, 2005 8:10 pm    Post subject: Linking my own libraries... Reply with quote

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
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Sat Mar 12, 2005 9:13 pm    Post subject: Re: Linking my own libraries... Reply with quote

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
Code:
dmd month.d jic.d
Back to top
View user's profile Send private message AIM Address
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Sun Mar 13, 2005 3:00 am    Post subject: Reply with quote

Yeah... I don't think it's documented somewhere... Now it is. :-)

thanks.

josé
Back to top
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Sun Mar 13, 2005 6:08 pm    Post subject: Reply with quote

jicman wrote:
Yeah... I don't think it's documented somewhere... Now it is. Smile
And I also added it to the ErrorMessages page at Wiki4D.

jicman wrote:
thanks.
You're quite welcome.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group