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
Hi -
1. We have just set up the latest snapshot:
GNU Pascal version 19991030, based on 2.95.2 19991024 (release), compiled Nov 3 1999 14:00:27.
and I'm now testing it on my programs. For the simple program
ftp://ftp.ncifcrf.gov/pub/delila/shell.p
there is a problem, the compile dies with this message:
% gpc shell.p --verbose --transparent-file-names -o shell.p Reading specs from /opt/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs gpc version 19991030, based on 2.95.2 19991024 (release) /opt/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/gpc-cpp -lang-pascal -v -nocharescape -D__GNU_PASCAL__ -undef -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GPC__=2 -D__GPC_MINOR__=0 -D__GPC_RELEASE__=19991030 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__BITS_BIG_ENDIAN__=1 -D__BYTES_BIG_ENDIAN__=1 -D__WORDS_BIG_ENDIAN__=1 -D__NEED_ALIGNMENT__=1 -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) shell.p /var/tmp/cc0ESHUT.i GNU CPP version 2.95.2 19991024 (release) (sparc) #include "..." search starts here: #include <...> search starts here: /usr/local/include /opt/gnu/sparc-sun-solaris2.6/include /opt/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/include /usr/include End of search list. /opt/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/gpc1 /var/tmp/cc0ESHUT.i -quiet -dumpbase shell.pas -version -famtmpfile=/var/tmp/ccyFrAx_.gpc -ftransparent-file-names -o /var/tmp/cc0ESHUT.s GNU Pascal version 2.95.2 19991024 (release) (sparc-sun-solaris2.6) compiled by GNU C version 2.95.2 19991024 (release). shell.p: In function `program_Shell': shell.p:112: internal error--unrecognizable insn: (insn 31 30 15 (set (symbol_ref:SI ("_p_MPNGHS")) (lo_sum:SI (reg:SI 113) (label_ref:SI 32))) -1 (nil) (expr_list:REG_LABEL (code_label/s 32 29 33 13 "" [num uses: 3]) (nil)))
This program uses a single goto to jump to the end of the program when a fatal error occurs. If I remove the label definition, the goto and the label itself, it compiles ok. Any idea what's wrong?
2. Suggestion: in the --verbose mode a URL pointer to the GPC pages would be handy.
3. --transparent-file-names seems to be working THANKS VERY MUCH!!!
Thanks!!
Tom
Dr. Thomas D. Schneider National Cancer Institute Laboratory of Experimental and Computational Biology Frederick, Maryland 21702-1201 toms@ncifcrf.gov permanent email: toms@alum.mit.edu http://www.lecb.ncifcrf.gov/~toms/
OOPS! The subject of my last email should have been something like:
gotos cause fatal compiler error
Tom
Dr. Thomas D. Schneider National Cancer Institute Laboratory of Experimental and Computational Biology Frederick, Maryland 21702-1201 toms@ncifcrf.gov permanent email: toms@alum.mit.edu http://www.lecb.ncifcrf.gov/~toms/