Mail Archives: djgpp/1996/07/15/13:04:12
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 -