Xref: news-dnh.mv.net comp.os.msdos.djgpp:1140 Newsgroups: comp.os.msdos.djgpp Path: news-dnh.mv.net!mv!news.sprintlink.net!malgudi.oar.net!news.erinet.com!netcom.com!dgrisner From: dgrisner AT netcom DOT com (David G. Risner) Subject: Re: Problems for linking "libpc.a" Organization: Southwestern University School of Law Library References: Date: Mon, 24 Jul 1995 20:12:51 GMT Lines: 21 Sender: dgrisner AT netcom17 DOT netcom DOT com To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp In article , wrote: >I used the following parameters for compilation: > > gcc -lpc t.c -o t > >and I got the following error message: > > t.c (.text +0x12): undefined reference to 'inportb' > Your command line should read as follows: gcc -o t t.c -lpc It is important that the libraries be listed after the sources which use them. -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- David G. Risner Southwestern University dgrisner AT netcom DOT com School of Law Library Los Angeles, CA -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-