Mail Archives: djgpp/1996/04/02/15:38:06
On Tue, 2 Apr 1996, John Brown wrote:
>
> (Newbee question: sorry if its been asked a thousand times before...)
>
> When compile the simple bit of code below using this command line:
>
> gcc -lpc -Wall -pedantic junk.c -o junk
>
> ... I get this error message:
>
> junk.c(.text+0xfd): undefined reference to 'getche'
>
> As far as I am aware: 'getche' is in the libpc.a library and the -lpc switch
> should instruct to linker (via the compiler) to search that library.
>
> Is this a command line error, or is something wrong with my library? I am
> fairly sure there is nothing wrong with my C program, but since I am new at
> this I guess it is also a real possibility! Any help will be greatly
> appreciated.
>
Is a command line error! You should place the "-lpc" switch at the tail
of the command line. Full details in the INFO docs.
- Raw text -