delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/07/25/14:21:49

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: <DC8AIM DOT C11 AT jade DOT mv DOT net>
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 <DC8AIM DOT C11 AT jade DOT mv DOT net>,  <goncalves AT if DOT usp DOT br> 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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

- Raw text -


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