BGI2GRX is exactly what you are looking for: A BGI wrapper to a portable graphics library, GRX, that can work on top of SVGAlib or X11 (or plain VGA or (in development) the Win32 API). Please install BGI2GRX and GRX, and just proceed.
ok now... i got grx-2.3 from gnu.de ftp site. i compiled it linking it with svgalib, and it seems to be ok. i added this to global /etc/profile (as written in the webpage):
export GRX20DRV='svgalib gw 640 gh 480 nc 16' export GRX20FNT=/usr/src/grx-2.3/fonts
now, bgi2grx.pas doen't seem to compile. this is what i get:
girardi@ux(tty2)/home/girardi/nnibbles# gpc -g --automake -o nnibbles main.pas flib.o: In function `Fill': /home/girardi/nnibbles/flib.pas:40: undefined reference to `putpixel' flib.o: In function `Occupied': /home/girardi/nnibbles/flib.pas:53: undefined reference to `getpixel' bgi2grx.o: In function `Moveto': /home/girardi/nnibbles/bgi2grx.pas:444: undefined reference to `__gr_X' /home/girardi/nnibbles/bgi2grx.pas:445: undefined reference to `__gr_Y' bgi2grx.o: In function `Closegraph': /home/girardi/nnibbles/bgi2grx.pas:450: undefined reference to `__gr_restorecrtmode' /home/girardi/nnibbles/bgi2grx.pas:452: undefined reference to `__gr_INIT' bgi2grx.o: In function `Setcolor': /home/girardi/nnibbles/bgi2grx.pas:456: undefined reference to `__gr_color' bgi2grx.o: In function `Setbkcolor': /home/girardi/nnibbles/bgi2grx.pas:460: undefined reference to `__gr_colorbg' bgi2grx.o: In function `Graphresult': /home/girardi/nnibbles/bgi2grx.pas:465: undefined reference to `__gr_INIT' /home/girardi/nnibbles/bgi2grx.pas:467: undefined reference to `__gr_Result' /home/girardi/nnibbles/bgi2grx.pas:469: undefined reference to `__gr_Result' bgi2grx.o: In function `Textheight': /home/girardi/nnibbles/bgi2grx.pas:514: undefined reference to `textheight' bgi2grx.o: In function `Textwidth': /home/girardi/nnibbles/bgi2grx.pas:528: undefined reference to `textwidth' bgi2grx.o: In function `Installuserfont': /home/girardi/nnibbles/bgi2grx.pas:541: undefined reference to `installuserfont'bgi2grx.o: In function `Outtext': /home/girardi/nnibbles/bgi2grx.pas:554: undefined reference to `outtext' bgi2grx.o: In function `Outtextxy': /home/girardi/nnibbles/bgi2grx.pas:568: undefined reference to `outtextxy' bgi2grx.o: In function `Grapherrormsg': /home/girardi/nnibbles/bgi2grx.pas:576: undefined reference to `grapherrormsg' bgi2grx.o: In function `Initgraph': /home/girardi/nnibbles/bgi2grx.pas:588: undefined reference to `initgraph' bgi2grx.o: In function `Getmodename': /home/girardi/nnibbles/bgi2grx.pas:596: undefined reference to `getmodename' bgi2grx.o: In function `Getdrivername': /home/girardi/nnibbles/bgi2grx.pas:606: undefined reference to `getdrivername' bgi2grx.o: In function `Arc': /home/girardi/nnibbles/bgi2grx.pas:614: undefined reference to `__gr_ellipse' bgi2grx.o: In function `Drawpoly': /home/girardi/nnibbles/bgi2grx.pas:619: undefined reference to `__gr_drawpoly' bgi2grx.o: In function `Getaspectratio': /home/girardi/nnibbles/bgi2grx.pas:624: undefined reference to `__gr_Xasp' /home/girardi/nnibbles/bgi2grx.pas:625: undefined reference to `__gr_Yasp' bgi2grx.o: In function `Getbkcolor': /home/girardi/nnibbles/bgi2grx.pas:629: undefined reference to `__gr_colorbg' bgi2grx.o: In function `Getcolor': /home/girardi/nnibbles/bgi2grx.pas:632: undefined reference to `__gr_color' bgi2grx.o: In function `Getfillpattern': /home/girardi/nnibbles/bgi2grx.pas:636: undefined reference to `__gr_fpatterns' bgi2grx.o: In function `Getfillsettings': /home/girardi/nnibbles/bgi2grx.pas:641: undefined reference to `__gr_fpatno' /home/girardi/nnibbles/bgi2grx.pas:642: undefined reference to `__gr_colorfill' bgi2grx.o: In function `Getmaxmode': /home/girardi/nnibbles/bgi2grx.pas:648: undefined reference to `__gr_set_up_modes' /home/girardi/nnibbles/bgi2grx.pas:649: undefined reference to `__gr_MaxMode' bgi2grx.o: In function `Getgraphmode': /home/girardi/nnibbles/bgi2grx.pas:655: undefined reference to `__gr_INIT' /home/girardi/nnibbles/bgi2grx.pas:657: undefined reference to `__gr_Mode' /home/girardi/nnibbles/bgi2grx.pas:658: undefined reference to `__gr_Result' bgi2grx.o: In function `Getx': /home/girardi/nnibbles/bgi2grx.pas:671: undefined reference to `__gr_X' bgi2grx.o: In function `Gety': /home/girardi/nnibbles/bgi2grx.pas:674: undefined reference to `__gr_Y' bgi2grx.o: In function `Linerel': /home/girardi/nnibbles/bgi2grx.pas:684: undefined reference to `__gr_line' bgi2grx.o: In function `Lineto': /home/girardi/nnibbles/bgi2grx.pas:689: undefined reference to `__gr_line' bgi2grx.o: In function `Pieslice': /home/girardi/nnibbles/bgi2grx.pas:699: undefined reference to `__gr_sector' bgi2grx.o: In function `Setaspectratio': /home/girardi/nnibbles/bgi2grx.pas:709: undefined reference to `__gr_Xasp' /home/girardi/nnibbles/bgi2grx.pas:710: undefined reference to `__gr_Yasp'
one more time i have to hope in your help,
i promise when i am able to help people with problems like these, i'll help them for you.