Mail Archives: djgpp/1994/08/31/03:00:51
> (1) I'm trying to compile a program out of a book that uses "getch".
> This should be in conio, which in djgpp just includes gppconio.
> The program compiles but the linker reports that getch is undefined.
> What is the magic to get the linker to find it?
getch() and other PC-specific routines are in the libpc.a library which
isn't included automagically on the ld command line by gcc compilation
driver (it only includes libc.a and libgcc.a). So the ``magic'' to get
getch() is to include -lpc at the end of your gcc command line.
> (2) Just for curiosity, where is getch, etc., in standard (Unix) gcc?
> The linker can't find it there either.
That's because there ain't no such thing as a Unix getch().
Eli Zaretskii
- Raw text -