Alejandro Villarroel wrote:
Hello. I'm a beginner with Gnu Pascal, so I have the binary file
gpc.exe and the other files like pc.exe, bpc.exe epc.exe I know there are subtle dirfferences between them, can you tell me wich are.
pc compiles Standard Pascal, epc Extended Pascal (both according to the official standards), bpc is as compatible to Borland/Turbo Pascal as possible (which means, less conforming to the standard), and gpc (the default) provides the union of all those standards and dialects plus some extensions. The same can be achived with the command line switches `--standard-pascal', `--extended-pascal', `--borland-pascal' and `--gnu-pascal' (the latter is the default, so it isn't needed normally). The switches should be preferred, because we're thinking about dropping the separate executables in future versions.
I can't describe all the features here, of course, but you can find a list of some interesting features of each and some demo programs in http://home.pages.de/~GNU-Pascal/about.html
Besides, the GPC info lists all built-in identifiers and reserved words, and mentions to which language versions they belong (at least, for most of them, some may still be missing).
In general, it's best to use the default (i.e., all GPC features), unless standard conformant programs have to be written (`--standard-pascal' or `--extended-pascal' then), or BP programs with many "dirty tricks" should be ported with minimal effort (`--borland-pascal' then).
Well, in Turbo Pascal, there is a directory named units, where all the .tpu files live. I guess, that I have to compile the source files in the include directory that came with the gpc files .
In the recent GPC releases (e.g. GPC-19990118) the units are in a directory `units', not `inlcude'.
I've tried to compile and link gpc.pas, but the followwing error message appear:
In the command line: gpc -m486 -O gpc.pas -Ic:\gpc\include -Lc:\gpc\lib -o exe\gpc.o
Units can't be linked, only programs (and dynamic libraries) can. Therefore, use the `-c' switch (compile only).
Besides, the `-m486' switch should be unnecessary as well as the `-I' and `-L' switches if you install GPC into the default directories below your DJGPP directory (assuming you're using the DJGPP version).
However, you can also compile any program with the `--automake' switch, and all needed units will be compiled automatically (if you have the units installed in a non-default directory, you can specify the path with `--unit-path=/foo/bar/baz'). So, normally you won't have to care about compiling the units.
By the way, I've used Rhide 1.4 before, with the same result. Speaking about rhide..., I have only configured the directories, but
what with the rest, is there something important that I have to put in the other menus?
I don't think so, but with a new release of GPC, you should create a file named rhide.env in %DJDIR%/share/rhide/, containing the following line:
RHIDE_COMPILE_LINK_PASCAL_AUTOMAKE=$(RHIDE_LD_PASCAL) $(RHIDE_LIBDIRS) $(RHIDE_LDFLAGS) -o $(OUTFILE) --automake $(RHIDE_GPC_FLAGS) $(SOURCE_NAME) $(RHIDE_LDFLAGS)
Frank