www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/02/15:38:06

Date: Tue, 2 Apr 1996 19:14:37 -0300
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: ERROR MSG: junk.c(.text+0xfd): undefined reference to 'getche'
To: John Brown <jabrown AT unix DOT infoserve DOT net>
cc: djgpp AT delorie DOT com
In-Reply-To: <199604021626.IAA17080@unix.infoserve.net>
Message-ID: <Pine.3.89.9604021912.A30752-0100000@dmeasc.rc.ipt.br>
MIME-Version: 1.0


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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019