www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/07/11/02:06:18

Date: Tue, 11 Jul 1995 08:09:47 +0300
From: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
To: PMills2627 AT aol DOT com
Subject: Re: linker error: "indefined reference to 'cputs'
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

> I'm having problems compiling a program that I wrote with turboc 2.0. I get
> an error " undefined reference to '<func>'" where <func> is cputs, gotoxy
> etc. I have included pc.h and gppconio.h as well as used the -lpc switch.
> what gives?

Did you put -lpc *after* all the object files and libraries which use
PC-specific routines?  GCC uses a single-pass linker, so if it sees
some PC functions after libpc.a was already scanned, it won't find them
and will complain.

If -lpc is the last thing on the command line, please post the command
line, because maybe something else is causing this.
 

- Raw text -


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