Date: Thu, 20 Mar 1997 17:28:55 -0300 Message-Id: <1.5.4.16.19970320133155.2a4f1f78@dmeasc.rc.ipt.br> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Andrew Deren , Abraham John Kannankeril From: Cesar Scarpini Rabak Subject: Re: Graphics not working Cc: djgpp AT delorie DOT com At 22:00 19/03/97 -0600, Andrew Deren wrote: >Are you using GRX? If not this is not going to work. you will need GRX >which I believe (I do not use it personally) has like Borland function No entirely true. In order to have Borland like API you have to use _in addition_ to GRX the BCC2GRX package. >calls. I would suggest using allegro for graphics though. > >On Wed, 19 Mar 1997, 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 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 >> >> It gave similar errors for 'setbkcolor()' too. >> >> Abraham & Arti >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cesar Scarpini Rabak E-mail: csrabak AT ipt DOT br DME/ASC Phone: 55-11-268-3522 Ext.350 IPT - Instituto de Pesquisas Tecnologicas Fax: 55-11-268-5996 Av. Prof. Almeida Prado, 532. Sao Paulo - SP 05508-901 BRAZIL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~