Mail Archives: djgpp/1996/05/25/02:13:11
Reply to message 1952339 from JOHN9904 AT XENS on 05/23/96 11:43AM
> I'm trying to get conio.h functions to work. Before you mention that
>this same question ask been asked and answeres 2^16 times, I know that I
>ought to compile with the -lpc argument. Even with this, I'm getting the
> D:\DJGPP\PROJ>gcc -lpc clr.c -o clr
> clr.c(.text+0x14): undefined reference to `getch'
> clr.c(.text+0x22): undefined reference to `putch'
You need to put the -lpc at the _end_ of the gcc command line, not the
beginning. ld is a one-pass linker, which means that if it sees -lpc before
the code which uses it, it won't know that it needs to link the functions.
BTW, are you using version 1.12 or version 2.0? In 2.0, libpc.a is simply
an empty library, as all its functions are included in libc.a. If you are
using
2.0, then your problem is something other than what I said above.
John
- Raw text -