Hi Mariano I am having difficulty with a simple test program running with GRX2.4.9. It will run successfully on Windows10 but not on Linux Mint 20 Cinnamon edition. It is called IO.c: #include <stdio.h> #include <stdlib.h> #include <grx20.h> int main() { int choice = 1; GrSetMode(GR_width_height_graphics,500,500); GrClearScreen(GrWhite()); GrSetWindowTitle("IO");
while(choice != 0)
{ printf("Menu : \n Quit (0) \n Square (1) \n Circle (2)\n"); printf("Choice ?"); scanf("%d",&choice); GrClearScreen(GrWhite()); switch(choice) { case 0 : return 0; case 1 : GrFilledBox(20,20,60,60,GrBlack()); break; case 2 : GrFilledCircle(40,40,20,GrBlack()); break; } } system("PAUSE"); return 0; } compiled as gcc -c IO.c gcc -o IO.exe IO.o -lgrx20X -lX11 -lm
When executed the display window is black and no output appears.No title “IO” appears, only “grx 500 x5 00 x 32”. I attach a screenshot.
I have the same problem when running this program using MGRX134 (with mgrx.h and slightly different compiler instruction). It fails under Linux but works under Windows10. This problem has also occurred in a more complex and useful program. However, GRX and MGRX do not fail in all my programs! Can you advise?
Best Wishes, Peter Williams