Mariusz Zynel wrote:
> Peter Gerwinski wrote:
> >
> > Mariusz Zynel wrote:
> > > > No, you have to give GPC the `-x pascal' option.
> > > I could not find that in man page. What does it mean?
> >
> > It means: "Forget about the suffix; this file _is_ Pascal source."
> >
>
> Yes, of course... man gcc.
It's also in the GPC info documentation (under `Invoking GPC').
Frank
--
Frank Heckenbach, frank(a)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
Peter Gerwinski wrote:
>
> Mariusz Zynel wrote:
> > > No, you have to give GPC the `-x pascal' option.
> > I could not find that in man page. What does it mean?
>
> It means: "Forget about the suffix; this file _is_ Pascal source."
>
Yes, of course... man gcc.
Thanks
--
.
Mariusz Zynel
Institute of Mathematics | phone: +48 (85) 745 75 52
University of Bialystok |
Akademicka 2 St | mailto:mariusz@math.uwb.edu.pl
15-267 Bialystok |
Poland | http://math.uwb.edu.pl/~mariusz/
Peter Gerwinski wrote:
>
> > > GPC does not automatically recognize the suffix `.dpr' for Pascal.
> >
> > So, I have to stay with copying to .pas than copying back to .dpr.
>
> No, you have to give GPC the `-x pascal' option.
I could not find that in man page. What does it mean?
>
> > We use Delphi to build our system, but we use also Free Pascal and
> > of course GPC. So we do not use Delphi extensions at all, we do not
> > even use classes, but old-BP-fashioned objects.
>
> Then it should work.
>
> > > Better do not use all those `--foo-pascal' switches. They are
> > > just for switching _off_ GPC extensions.
> >
> > Without that swicht I have problems with building our system. The
> > code is simply BP code with changes forced by mentioned compilers,
> > usually compiled conditionally.
> >
> > Do those --foo-pascal switches do more than switching off GPC
> > extensions?
>
> Not really: They switch off warnings about some BP braindamage
> and some reserved identifiers not present in BP, and they switch
> on warnings about GPC extensions.
>
> > Are they safe?
>
> Yes, of course. In which sense are you afraid of them being
> unsafe? They are only affecting warning behaviour.
I was not sure what exactly those switches do. I see they are safe.
Thank you Peter
--
.
Mariusz Zynel
Institute of Mathematics | phone: +48 (85) 745 75 52
University of Bialystok |
Akademicka 2 St | mailto:mariusz@math.uwb.edu.pl
15-267 Bialystok |
Poland | http://math.uwb.edu.pl/~mariusz/
Hi All
When I try to compile a program which source has suffix .dpr I get
an eror message from linker:
$ gpc -s --borland-pascal -DGPC -DSOLARIS --unit-path=../obj -o accom
accom.dpr
ld: elf error: file accom.dpr: unknown type, unable to process using
elf(3E) libraries
ld: fatal: File processing errors. No output written to accom
collect2: ld returned 1 exit status
Even if I exchange --borland-pascal for --object-pascal which seems
to be Delphi compatibility mode, the story repeats. Is it GPC
problem? Any ideas? ...besides changing filenames.
I'm using GPC dated 19991030 build on GCC 2.95.2 on Solaris 8 x86.
Thanks in advance for responses
--
.
Mariusz Zynel
Institute of Mathematics | phone: +48 (85) 745 75 52
University of Bialystok |
Akademicka 2 St | mailto:mariusz@math.uwb.edu.pl
15-267 Bialystok |
Poland | http://math.uwb.edu.pl/~mariusz/
Chris Karow wrote:
> I am trying to use the compiler on an 32 bit SGI, v6.5
> operating system. I downloaded the binaries for both
> the gcc (fw_gcc-2_8_1-sgipl2.tardist) and gpc
> (gpc-19990118.mips-sgi-irix6.2.tar.gz). I installed
> both, gcc in /usr/freeware and gpc in /usr/local.
> I've run gcc and tested it and it works fine. When I
> test gpc, I get a long message starting with
This looks like the compiler is working, and complains about some
problems in the code begin compiled.
Apparently, the code was written for another Pascal compiler (SGI
Pascal???) which predefines some non-standard identifiers. I can
give you a few tips how to define them in GPC. Some of the errors
are probably consequences of the missing identifiers.
> "tabutil.pas:25: warning: missing program header
According to the standard, a program requires a `program' line at
the beginning. If it's missing, GPC will warn, but still compile the
program.
> tabutil.pas:30: type name expected, identifier
> `String80' given
> tabutil.pas:31: type name expected, identifier
> `String20' given
> tabutil.pas: In function `Readint':
> tabutil.pas:60: type name expected, identifier
> `String255' given
type
String80 = String (80);
String20 = String (20);
String255 = String (255);
> tabutil.pas:68: undeclared identifier `Depend_err'
> (first use this function)
I don't know what this is (haven't seen this anywhere before).
Perhaps it's define in some module which is supposed to be compiled
with the given source (via `imports' or as an include file, ...).
Otherwise, you'd have to figure out what this procedure(?) is
supposed to do...
> tabutil.pas:69: undeclared identifier `Str2int' (first
> use this function)
> tabutil.pas:86: undeclared identifier `Str2real'
> (first use this function)
GPC supports:
ReadStr ( <source string>, <integer, real, string, char>... )
and
Val ( <source string>, <integer or real>, <result> )
(result will be 0 if successful, >0 if not)
Based on this, you can write Str2Int and Str2Real as needed by your
code. Since this depends on whether they are supposed to be
procedures or functions and on their parameter lists, I can't give
you drop-in routines, but perhaps something like the following:
function Str2Int (const s: String) = Res: Integer;
begin
ReadStr (s, Res)
end;
(However, it looks like your code has a `ReadStr' routine itself, so
either do the above before the (re-)declaration of `ReadStr' or use
`Val'.)
> tabutil.pas:102: undeclared identifier `Strg' (first
> use this function)
I don't know what this means. On German keyboards, `Strg' is the
`Ctrl' key, but I doubt that's meant here. ;-) It could be
Str(ing)G(reater) or anything else, but I really don't know without
seeing some context (or documentation of the original compiler).
> tabutil.pas:128: undeclared identifier `Fopen' (first
> use this function)
Looks like the name of a C funcion (fopen()). If that's really
what's meant here, you can probably use the normal file routines
(`Reset', `Rewrite', `Extend')...
> tabutil.pas:136: undeclared identifier `Indx' (first
> use this function)
GPC supports `Index' (find a substring in a string), in case that's
what `Indx' is supposed to be...
If these things are really built-in declarations of some Pascal
compiler (and not part of some other modules), we could try to add
them to GPC. We have done this for other dialects or other
compilers' definitions (in particular, Borland Pascal), so it
wouldn't be completely new to us. However, we'd need some reasonable
documentation on this compiler's declarations (or better yet, free
code to implement them :-).
Frank
--
Frank Heckenbach, frank(a)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
Hi,
I am new to this mailing list but I have done a lot of
upfront work before writing for help. I am new to
compilers but have to install GPC compiler for a user.
I have read the Install and Readme for gpc and gcc.
I have also gone through all of 12/99 mailing list
archive and I still need help.
I am trying to use the compiler on an 32 bit SGI, v6.5
operating system. I downloaded the binaries for both
the gcc (fw_gcc-2_8_1-sgipl2.tardist) and gpc
(gpc-19990118.mips-sgi-irix6.2.tar.gz). I installed
both, gcc in /usr/freeware and gpc in /usr/local.
I've run gcc and tested it and it works fine. When I
test gpc, I get a long message starting with
"tabutil.pas:25: warning: missing program header
tabutil.pas:30: type name expected, identifier
`String80' given
tabutil.pas:31: type name expected, identifier
`String20' given
tabutil.pas: In function `Readint':
tabutil.pas:60: type name expected, identifier
`String255' given
tabutil.pas:63: only Pascal string type, array of
char, and char type
tabutil.pas:63: are assignment compatible with a
string
tabutil.pas:68: undeclared identifier `Depend_err'
(first use this function)
tabutil.pas:68: (Each undeclared identifier is
reported only once
tabutil.pas:68: for each function it appears in.)
tabutil.pas:69: undeclared identifier `Str2int' (first
use this function)
tabutil.pas: In function `Readreal':
tabutil.pas:76: type name expected, identifier
`String255' given
tabutil.pas:80: only Pascal string type, array of
char, and char type
tabutil.pas:80: are assignment compatible with a
string
tabutil.pas:85: undeclared identifier `Depend_err'
(first use this function)
tabutil.pas:86: undeclared identifier `Str2real'
(first use this function)
tabutil.pas: In function `Readstr':
tabutil.pas:102: undeclared identifier `Strg' (first
use this function)
tabutil.pas: At top level:
tabutil.pas:120: type name expected, identifier
`String255' given
tabutil.pas: In function `Readmatrix':
tabutil.pas:126: type name expected, identifier
`String255' given
tabutil.pas:128: undeclared identifier `Fopen' (first
use this function)
tabutil.pas:131: argument to `length' must be of
string or char type
tabutil.pas:131: only Pascal string type, array of
char, and char type
tabutil.pas:131: are assignment compatible with a
string
tabutil.pas:132: subscripted object is not an array or
string
tabutil.pas:134: argument to `length' must be of
string or char type
tabutil.pas:134: only Pascal string type, array of
char, and char type
tabutil.pas:134: are assignment compatible with a
string
tabutil.pas:136: undeclared identifier `Indx' (first
use this function)
tabutil.pas:145: incompatible type for argument 2 of
`Readstr'
tabutil.pas:145: too many arguments to function
`Readstr'
tabutil.pas:146: incompatible type for argument 2 of
`Readstr'
tabutil.pas:146: too many arguments to function
`Readstr'
tabutil.pas:147: incompatible type for argument 2 of
`Readstr'
tabutil.pas:147: too many arguments to function
`Readstr'
tabutil.pas: In function `Scalematrix':
tabutil.pas:195: subscripted object is not an array or
string
tabutil.pas:196: undeclared identifier `Indx' (first
use this function)
tabutil.pas: In function `program_noname':
tabutil.pas:212: parse error before `End'
When this didn't work, I unpacked the source in
/usr/local/src for both gcc (gcc-2_8_1_tar.gz) and gpc
(gpc-19990118.tar.gz. I moved the p dir. from gpc to
gcc dir. and ran the patch and ran configure. I then
ran make LANGUAGES=pascal and received errors like
missing cfe so copied into /usr/lib/cfe. Also,
received errors for the inttypes.h, staarg.h and
cccp.c and corrected paths. Gave up on this and
removed both gcc and gpc source dir. and reinstalled
the gpc and gcc binaries. Tested gcc OK. Same error
mess. for gpc.
If I run gpc -v, the output is gpc vers.19990118,
based on gcc 2.8.1.
If I run gcc -v, the output is reading specs from
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.8.1/specs
gcc version 2.8.1.
I think I have compatible gpc and gcc vers.
When I run gpc -verbose, I get
"Using builtin specs.
gpc version 19990118, based on gcc-2.8.1
ld -call_shared -no_unresolved -init
__do_global_ctors -fini __do_global_dtors
-_SYSTYPE_SVR4 -n32 /usr/lib32/mips3/crt1.o crtbegin.o
-L/usr/local/lib/gcc-lib/mips-sgi-irix6.2/2.8.1
-L/usr/local/lib/gcc-lib/mips-sgi-irix6.2/2.8.1
-L/usr/local/lib -lgpc -lm -dont_warn_unused -lgcc
-warn_unused -L/usr/lib32/mips3 -L/usr/lib32
-dont_warn_unused -lc -warn_unused -dont_warn_unused
-lgcc -warn_unused crtend.o /usr/lib32/mips3/crtn.o
ld32: FATAL 9: I/O error (crtbegin.o): No such file or
directory"
I had found this file under
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.8.1 and
had worked with this path as well but to no avail.
Any help would be appreciated!
Chris
=====
__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com
index gpc compiler
=====
__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com
info gpc compiler
=====
__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com
=?iso-8859-1?Q?Klaus_Friis_=D8stergaard?= wrote:
> To be able to acces the gpc compiler I have symlinked
>
> ln -s /usr/local/bin/gpc /usr/bin/gpc
Isn't /usr/local/bin in your PATH?
> but when I compile a pascal program with a unit, like crt the compiler
> places alot of .o and .gpi files in the directory that I compile from, can
> this be redirected so that it will come in the ..../units where the crt.pas
> gpc.pas and all the other units are.
--unit-destination-path=DIR
Frank
--
Frank Heckenbach, frank(a)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