From: ZionHill Newsgroups: comp.os.msdos.djgpp Subject: HELP: undefined reference to 'inportb' - outdated lib file? Date: Wed, 18 Dec 1996 16:23:41 -0800 Organization: Little, If Any... Lines: 39 Message-ID: <32B88B0D.2D3F@ot.com> Reply-To: zionhill AT ot DOT com NNTP-Posting-Host: gennarpd.apci.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp here's a test version of the code, the real code is too big to show here. This fragment will reproduce the error just like the big program. /*--------------------------------------*/ /* inportb is defined in pc.h as: unsigned char inportb(unsigned short port); */ #include void main(void) { /* declare an unsigned char to be the return val */ unsigned char red; /* declare an unsigned short to be the sending parm */ unsigned short PALETTE_DATA = 0x3c9; /* execute it */ red = inportb(PALETTE_DATA); } /*--------------------------------------*/ 1. when I run the code through cpp, I can see the pc.h file coming in without error. 2. when I compile the .c file itself it compiles fine. 3. when I go to link it the message occurs: undefined reference to 'inportb' Does this mean that the lib file that contains the "pc.h" functions is missing or outdated? (it's probably not missing if it's 'libc.a') answers appreciated, Zion "New to GNU" Hill