www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/26/21:16:16

From: "Rob Zombie" <digifx AT concentric DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Using grx22 under djgpp
Date: Mon, 26 Jan 1998 21:02:56 -0500
Organization: Concentric Internet Services
Lines: 27
Message-ID: <6ajf9p$b1b@examiner.concentric.net>
References: <34CC0748 DOT 2745FAA9 AT ea DOT oac DOT uci DOT edu>
NNTP-Posting-Host: ts001d21.sag-mi.concentric.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>  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 -


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