delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/15/13:04:12

Date: Wed, 10 Jul 1996 17:53:48 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: lolo <lolo AT einev0 DOT einev DOT ch>
Cc: djgpp AT delorie DOT com
Subject: Re: grx20, other question
In-Reply-To: <31E3669E.6CC8@einev0.einev.ch>
Message-Id: <Pine.SUN.3.91.960710175036.5129E-100000@is>
Mime-Version: 1.0

On Wed, 10 Jul 1996, lolo wrote:

> When I use a grx fonction(for ex: GrSetMode) in my source and compile it
> I get a message of "undefined reference to 'GrSetMode'" 
> 
> But when I give a "gcc myprog.c .../grx20/lib/libgrx20.a" it's compile fine
> and my .EXE is working.
> 
> The questions : Why must I give the path and name of the library to use it.
> And if it's right so, what is the role of the path to the grx library in my DJGPP.ENV 

The path only tells gcc *where* to look for libraries, but it doesn't tell
it *what* libraries to scan.  You need to tell gcc to scan libgrx20.a,
like this: 

	gcc myprog.c -lgrx20

The -lgrx20 switch tells gcc to scan libgrx20.a, and LIBRARY_PATH tells 
it where should it look to find libgrx20.a (and other libraries).

- Raw text -


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