www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/20/06:21:51

Date: Thu, 20 Mar 1997 12:11:10 -0300
Message-Id: <1.5.4.16.19970320081416.2a4f9a26@dmeasc.rc.ipt.br>
Mime-Version: 1.0
To: joji AT wsunix DOT wsu DOT edu, djgpp AT delorie DOT com
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: Graphics not working

At 21:46 19/03/97 GMT, Abraham John Kannankeril wrote:
>The following program is giving errors. Please help us!!!
>
>
>#include <iostream.h>
>#include<stdio.h>
>#include <stdlib.h>
>#include <process.h>
>#include <conio.h>
>#include <libbcc.h>
>
>int main()
>{
>  int gdriver=DETECT,gmode, errorcode;
>  int  midx,midy;
>
>
>  initgraph(&gdriver,&gmode,"" );
>  errorcode=graphresult();
>  if (errorcode!=grOk)
>  {
>     cout<<"Graphics function error: "<<grapherrormsg(errorcode)<<endl;
>     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
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Raw text -


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