Date: Wed, 10 Jul 1996 17:53:48 +0200 (IST) From: Eli Zaretskii To: lolo Cc: djgpp AT delorie DOT com Subject: Re: grx20, other question In-Reply-To: <31E3669E.6CC8@einev0.einev.ch> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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).