Mail Archives: djgpp/1998/01/26/21:16:16
>  I've downloaded and installed DJGPP and been able to successfully
>compile a few simple programs (my own) using gcc.  I'd like to implement
>simple graphics in some of them, but I am having difficulty in getting
>my programs to recognize the grx libraries.
Here's a simple program that works with GRX 2.2:
#include "grx22.h"
void main (void)
{
 GrSetMode(GR_320_200_graphics);
 GrLine(1,1,100,100,15);    // draw a diagonal line across half the screen
 GrPlot(160,100,1);            // plot a dot in the center of the screen
 delay(3000);                // 3 second delay to see our beautiful art
}
compile with:
gcc -o test.exe test.c -lgrx22
assuming you've named the file test.c
- Raw text -