delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/05/02:19:46

Date: Thu, 5 Nov 1998 09:19:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Alessandro Moure <moure AT sercomtel DOT com DOT br>
cc: djgpp AT delorie DOT com
Subject: Re: GRX 2.3 and Jpeg-6b.
In-Reply-To: <36410C0A.EB7A1469@sercomtel.com.br>
Message-ID: <Pine.SUN.3.91.981105091924.2883K-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Thu, 5 Nov 1998, Alessandro Moure wrote:

> Hi. I've download version 2.3 of GRX library and the JPEG-6B pack.
> After a few hours I've managed to create the libjpeg.a file. :)
> 	But, now, when I try to compile my software, I get a error message
> "undefined reference to GrGetScanlineC()" function. This function is
> called by SaveContextToJpeg().
> 	I've checked grx20.h and the function is there.

You are looking in the wrong place.  When the linker complains about
``undefined references'', it means it cannot find the function (or
some other globally-defined symbol, like a global variable) in any of
the libraries you included on the link command line.  Header files
just declare the prototypes of functions, and only for the consumption
of the compiler; the linker doesn't care about headers.

So what you need is to look for `GrGetScanlineC' in the GRX library,
or in the GRX sources, if the library doesn't include it.  The `nm'
utility is the usual tool to look at library contents, and section 8.8
of the DJGPP FAQ list explains how to use `nm' to do that.

> 	BTW, there was a small bug in the ctx2jpeg.c file. In line 140, the
> parameter is "cxt" and not "ctx".

I suggest to report this to the Jpeg maintainers.

- Raw text -


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