Thanks a lot, Frank.
BTW, this little script could build all the units (except gpc-bp.pas for BP, not for GPC).
/opt/GCC2952/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/units> cat build_units #!/bin/sh for file in `ls *.pas` do gpc -c $file done
Thanks again.
From: Frank Heckenbach[SMTP:frank@g-n-u.de] Sent: Thursday, December 23, 1999 10:56 AM To: gpc@gnu.de Subject: Re: could not compile crt.pas
Mason Ip wrote:
I had compiled gpc on Sparc Solaris 7 OK. But the crt.pas was not
compiled.
As Mariusz said, units are not compiled when building GPC, but when needed in a program.
After installation, gpc (and gcc, etc) were installed OK. But there was
no
crt.gpm built from crt.pas.
There is no crt.gpm because CRT is a (BP style) unit, not an (EP style) module. Units create .gpi and .o files, modules .gpi, .gpm and .o.
/opt/GCC2952/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/units> gpc -O --automake crt.pas
By default, GPC tries to link (i.e. create an executable) which it can't do with a unit. To compile a unit, use the `-c' option.
Or, you can directly compile a program, e.g. `gpc -O --automake /usr/doc/gpc/examples/crtdemo.pas' which will automatically compile CRT and link all requires files and libraries.
I'm just writing a utility which will make all of this easier...
Frank
-- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/ GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html