-- test.c -- #include <grx20.h> #include <malloc.h> static int xmax, ymax, status;
Why this?, it not makes sense, GRXMain will be called from WinMain (in the video driver)
int MAIN__() { GRXMain(); }
This is ok
int GRXMain() { gstest1(); }
gstest1() { long nplanes; int points[4][2] = {{30,30},{300,30},{300,300},{30,300}}; GrLineOption GSDefinition;
/* Initialisiere Graphik */ GrSetMode(GR_default_graphics); xmax=GrMaxX(); ymax=GrMaxY();
/* Initialisiere eine Farbe (Rot) */ GrSetColor( 2, 255, 0, 0);
/* Zeichne Viereck mit Groesse des Bildschirms -10 */ GrBox(10, 10, xmax-10, ymax-10, 2);
You need some code here if you want to see something
GrSetMode(GR_default_text);
}
The problem is not in GRX, when Mingw makes a windows program (via the -mwindows switch) it expect to begin with WinMain, not main.