Mail Archives: djgpp/1997/03/13/19:03:47
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 -