Sven Hilscher wrote:
girardi@ux(tty2)/home/girardi/nnibbles# gpc -g --automake -o nnibbles main.pas flib.o:
you have to use the -l switches for the librarys
gpc -g -- automake main.pas -onnibbles flib.o -lbcc2 -lgrx20
I think under Linux, you need some more libs, in particular -lvga, and depending on how your svgalib was built, perhaps some more libs (with my version: -ljpeg, -ltiff and -lz). (And if you want the X11 version, you need -lgrx20X and -lX11 instead.)
Rather than giving them on the command line each time you compile a program, you can also insert `$L' statements into the graph unit (like we do for the other units that use libraries -- but in the case of the graph unit, we are not permitted to distribute a modified version):
{$ifdef MSDOS} {$L bcc2,grx20} {$elif defined (X11)} {$L bcc2,grx20X,X11} {$else} {$L bcc2,grx20,vga,jpeg,tiff,z} {$endif}
Then you should be able to just do `gpc -g --automake -o nnibbles main.pas flib.o' (add `-DX11' if you want the X11 version).
Frank