delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/09/30/23:46:15

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: jbs30000 AT aol DOT com (Joel)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Ignore my last post, please read this
Date: 30 Sep 2003 20:42:10 -0700
Organization: http://groups.google.com
Lines: 40
Message-ID: <84e4e2a9.0309301942.5952d23e@posting.google.com>
References: <84e4e2a9 DOT 0309291637 DOT 21d309a7 AT posting DOT google DOT com> <ur81yerzg DOT fsf AT elta DOT co DOT il>
NNTP-Posting-Host: 172.152.223.215
X-Trace: posting.google.com 1064979731 29336 127.0.0.1 (1 Oct 2003 03:42:11 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Wed, 1 Oct 2003 03:42:11 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii <eliz AT elta DOT co DOT il> wrote in message news:<ur81yerzg DOT fsf AT elta DOT co DOT il>...
> > From: jbs30000 AT aol DOT com (Joel)
> > Newsgroups: comp.os.msdos.djgpp
> > Date: 29 Sep 2003 17:37:26 -0700
> > 
> > OK, after looking at my last post, I see it's too long and hard to
> > read, so I'll make this question very simple.  If a routine includes
> > these external declarations:
> > 
> > extern void Bank_Plot_8(unsigned short X, unsigned short Y, unsigned
> > char R, unsigned char G, unsigned char B, unsigned char LO);
> > 
> > extern void Linear_Plot_8(unsigned short X, unsigned short Y, unsigned
> > char R, unsigned char G, unsigned char B, unsigned char LO);
> > 
> > extern void (*Plot_Pixel)(unsigned short X, unsigned short Y, unsigned
> > char R, unsigned char G, unsigned char B, unsigned char LO);
> > 
> > extern unsigned long (*Pixel_Point)(unsigned short X, unsigned short
> > Y);
> > 
> > And then I go
> > 
> > Plot_Pixel = &Linear_Plot_8;
> > 
> > Pixel_Point = &Linear_Point_8;
> > 
> > And I get an error:
> > 
> > Error: undefined reference to `Linear_Point_8(unsigned short, unsigned
> > short)
> > 
> > What could be the problem?  Thank you.
> 
> The linker needs to see the _definition_ of that function, not just
> its prototype declaration.  That is, when you link your program, one
> of the object files you link must have the code of Linear_Point_8.

Thank you.  Funny thing is, I thought that I did have the code
written.  But, at any rate, I have it written now.  Thanks again.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019