I have some problems compiling some grx-2.3.1 pascal sample test programs using the latest gpc 20000705. My system is Sun Sparc Solaris 7. Currently I have two versions of gpc on my system.
A) Old GPC (and GCC) /opt/GCC2951/bin/gpc -v Reading specs from /opt/GCC2951/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/specs gpc version 19991030, based on 2.95.1 19990816 (release)
B) New GPC (and GCC) /opt/GCC2952/bin/gpc -v Reading specs from /opt/GCC2952/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs gpc version 20000705, based on 2.95.2 19991024 (release)
I have fetched GRX (Graphics) source from the URL below. http://www.gnu.de/software/GRX/download/grx-2.3.1.tar.gz. grx-2.3.1 were compiled and (manually) installed to the "Old" and "New" dir's using "Old" and "New" GCC respectively; so far no problem.
Problems come when building the sample pascal programs under grx-2.3.1's pascal directory. grx-2.3.1/pascal> ls ./ build-examples* modetest.pas vir_test.pas ../ grx20.gpi taste.pas bgi/ grx20.o txt_test* blt_test.pas grx20.pas txt_test.pas
Here I have my tiny script "build-examples" to build the *.pas. grx-2.3.1/pascal> cat build-examples #!/bin/sh for pgm in `echo blt_test modetest taste txt_test vir_test` do echo compiling $pgm echo /opt/GCC2952/bin/gpc -o $pgm $pgm.pas /opt/GCC2952/lib/libgrx20X.a -lX11 /opt/GCC2952/bin/gpc -o $pgm $pgm.pas /opt/GCC2952/lib/libgrx20X.a -lX11 echo ----- done
If I use the "Old" gpc from the script (keeping /opt/GCC2952/lib/libgrx20X.a the same), building were OK. With the "New" gpc, *no pascal programs were built*; the following were the script output (see below). I have no idea why the "init_Grx20" sysmol was not resolved by the "New" gpc, using the *same* library (/opt/GCC2952/lib/libgrx20X.a).
<-- logging begin ---> compiling blt_test /opt/GCC2952/bin/gpc -o blt_test blt_test.pas /opt/GCC2952/lib/libgrx20X.a -lX11 blt_test.pas:26: type name expected, identifier `Grfont' given blt_test.pas:27: warning: type defaults to `int' in declaration of `F' ----- compiling modetest /opt/GCC2952/bin/gpc -o modetest modetest.pas /opt/GCC2952/lib/libgrx20X.a -lX11 Undefined first referenced symbol in file init_Grx20 /var/tmp/ccsjaOcV1.o ld: fatal: Symbol referencing errors. No output written to modetest collect2: ld returned 1 exit status ----- compiling taste /opt/GCC2952/bin/gpc -o taste taste.pas /opt/GCC2952/lib/libgrx20X.a -lX11 Undefined first referenced symbol in file init_Grx20 /var/tmp/ccXDaydV1.o ld: fatal: Symbol referencing errors. No output written to taste collect2: ld returned 1 exit status ----- compiling txt_test /opt/GCC2952/bin/gpc -o txt_test txt_test.pas /opt/GCC2952/lib/libgrx20X.a -lX11 txt_test.pas:28: type name expected, identifier `Grfont' given txt_test.pas:29: warning: type defaults to `int' in declaration of `F' txt_test.pas: In function `pascal_main_program': txt_test.pas:51: missing `^' in indirect function call txt_test.pas:51: called object is not a procedure or function txt_test.pas:61: assignment from incompatible pointer type txt_test.pas:65: missing `^' in indirect function call txt_test.pas:65: called object is not a procedure or function ----- compiling vir_test /opt/GCC2952/bin/gpc -o vir_test vir_test.pas /opt/GCC2952/lib/libgrx20X.a -lX11 vir_test.pas: In function `pascal_main_program': vir_test.pas:140: called object is not a procedure or function -----