www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/16/16:20:55

Xref: news-dnh.mv.net comp.os.msdos.djgpp:4436
Newsgroups: comp.os.msdos.djgpp
From: pjbk AT cee DOT hw DOT ac DOT uk (Peter JB King)
Subject: Re: Peter: Again!! undefined reference!!!
Message-ID: <DLA916.KtG@cee.hw.ac.uk>
Sender: news AT cee DOT hw DOT ac DOT uk (News Administrator)
Organization: Dept of Computing & Electrical Engineering, Heriot-Watt University, Scotland
References: <DL5EJp DOT 1p4 AT jade DOT mv DOT net>
Date: Tue, 16 Jan 1996 16:41:29 GMT
Lines: 30
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <DL5EJp DOT 1p4 AT jade DOT mv DOT net> enoch AT terranet DOT terranet DOT ab DOT ca (Peter Plum) writes:
>Error Message:
>
>GNU C++ Compile: CUBESCPR.c
>CUBESCPR.c(.text+0x3b): undefined reference to `cprintf'
>CUBESCPR.c(.text+0x6a): undefined reference to `cprintf'
>
>Program:
>
>#include <conio.h>
>main()
>{
>	int i;
>	cprintf("Table of cubes\r\n");
>	for(i=1; i<11; i++)
>	{
>		cprintf("The cube of %2d is %4d\r\n", i, i*i*i);
>	}
>}

I think that you need to include the pc library in your load line, eg

	gcc -o myprog myprog.o myroutine.o -lgpp -lpc



-- 
Peter King, Computing & Electrical Eng.	 Internet: pjbk AT cee DOT hw DOT ac DOT uk
  Heriot-Watt University, Riccarton, Edinburgh EH14 4AS
Phone: (+44) 131 451 3433               Fax: (+44) 131 451 3431

- Raw text -


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