Newsgroups: comp.os.msdos.djgpp From: Faiz Hanif Subject: Graphics not working Sender: news AT serval DOT net DOT wsu DOT edu (News) Message-ID: <3338445D.1CE9@wsunix.wsu.edu> Date: Tue, 25 Mar 1997 21:32:13 GMT Reply-To: haniff AT wsunix DOT wsu DOT edu Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Organization: Washington State University Lines: 63 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Cesar Scarpini Rabak wrote: > > At 21:46 19/03/97 GMT, Abraham John Kannankeril wrote: > >The following program is giving errors. Please help us!!! > > > > > >#include > >#include > >#include > >#include > >#include > >#include > > > >int main() > >{ > > int gdriver=DETECT,gmode, errorcode; > > int midx,midy; > > > > > > initgraph(&gdriver,&gmode,"" ); > > errorcode=graphresult(); > > if (errorcode!=grOk) > > { > > cout<<"Graphics function error: "< > cout<<"Hit a key to stop: "; > > getch(); > > exit(1); > > } > > > > setbkcolor(BLACK); > > setcolor (BLUE); > > closegraph(); > > return (0); > >} > > > > > > > >The program compiled without errors, but while trying to run the > ^^^^^^^^^^^^^^^! What version of DJGPP are you using folks? > > program > >it gave us following errors > > > >Error: grph1.o: In function 'main': > >Error: undefined reference to 'initgraph' > > In function 'setcolor(int)': > > undefined reference to '__gr_color' > >There were some errors > > These msgs seem to come out from the linker. > > Can you pls post the command line used to build this program? > > > > >It gave similar errors for 'setbkcolor()' too. > > > >Abraham & Arti > > > > > We are using Rhide 1.1 and DJGPP ver 2 . Arti & Abraham