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: Sender: news AT cee DOT hw DOT ac DOT uk (News Administrator) Organization: Dept of Computing & Electrical Engineering, Heriot-Watt University, Scotland References: 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 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 >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