delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/13/19:03:47

Newsgroups: comp.os.msdos.djgpp
From: Abraham John Kannankeril <joji AT wsunix DOT wsu DOT edu>
Subject: Graphics not working
Sender: news AT serval DOT net DOT wsu DOT edu (News)
Message-ID: <33287A5C.B9A@wsunix.wsu.edu>
Date: Thu, 13 Mar 1997 22:06:20 GMT
Reply-To: joji AT wsunix DOT wsu DOT edu
Mime-Version: 1.0
Organization: Washington State University
Lines: 79
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

We downloaded GRX20.zip and followed the following instructions.


After you un-zip the GRX archive you need to do the following things to
use it:

Set two environment variables:

1) SET GRX20DRV=<driver> gw <width> gh <height> nc <colors> 
2) SET GRXFONT=<directory for the GRX fonts>

Available drivers are:

  stdvga
  stdega
  et4000
  cl5426
  mach64
  ati28800 
  VESA

After setting these you may run "bin/modetest" to see what modes you
have.

To compile and link a program you need to make sure that the compiler
"sees" the "include" and "lib" directories of the GRX20 package. Either
use the -I and -L compiler switches with these directories or copy
the files from these dirs to a standard place.

The computer we are working on shows the setting as

adapter type -Mach64    monitor- SONY Multiscan 17sf
desktop area - 1024 x 768

so accordingly we set the environment variables.

Then we downloaded BCC2GRX and followed the instructions given in README
and tried the following program. 

 #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);
 }

 
 It gave following errors
 
Error: 'grOK' undeclared (first use this function)
Error: (Each undeclared identifier is reported only once for each
function it appears in)
There were some errors

We don't know where we are going wrong. Can anyone help us?

Abraham & Arti

- Raw text -


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