www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/07/24/12:15:49

Date: Mon, 24 Jul 1995 12:00:20 GMT-03:00
From: goncalves AT if DOT usp DOT br
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Problems for linking "libpc.a"

Hi,

I cannot use functions from the "libpc.a" library. For instance, for a test
with the "inportb" function:

        #include <pc.h>
        #include <stdio.h>

        int main(void)
        {
            int ch;
            ch=inportb(0x60);
            printf("%d\n",ch);
            return(0);
        }

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'

Does anyone can help me? It's perhaps a trivial problem, but after reading
all FAQ's I was not able to solve it. Thank you!

Whilk.

- Raw text -


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