Maurice,

thanks for the prompt response.

I was just showing an example of the our source files.  This whole software is composed on a couple hundred files (about 95% in Pascal, some C, and a couple in assembly).  The whole thing is then linked.  So there is only one file with the program header.  All other source files just contain procedures in Pascal or C functions.

In this particular instance, I am trying to make a program where a C program calls the Pascal routine.

Regards,

Jing

-----Original Message-----
From: Maurice Lombardi [mailto:Maurice.Lombardi@ujf-grenoble.fr]
Sent: Thursday, July 05, 2001 11:42 AM
To: Gloria, Jing
Cc: 'gpc@gnu.de'
Subject: Re: Compiling Source Files w/o Program Statement


Gloria, Jing wrote:

> I have installed GPC and GCC on a Solaris 7 x86 platform.  We are
> migrating software from RISC/SPARC Sun OS to x86 Solaris 7.
>
> GPC is version 19991030. based on 2.95 19990728.  GCC is 2.95.2.
>
> The GPC Mailing List archive web site has been unreachable.  I apologize
> if the following question has already be addressed in the past.
>
> Problem:  GPC will not compile our Pascal source files since they do not
> have any Program statements.
>
> Sample program:
>
> Procedure hello;
> begin
>   Writeln ('PASCAL says: Hello, world.');
>   Writeln (' ')
> End;
>
> ****end of sample program****
>
> When I run GPC (gpc -c filename), I get the following messages:
>   warning: missing program header
>   parse error at end of input
>
> The only way I found to get gpc to compile is by adding:
> Begin
> End.
>
> at the end of the source file.  I still get the warning message about
> missing program header but GPC compiles.  I would prefer not to do this
> since we will be using the same source files for the maintenance of the
> software in both SPARC/RISC and Intel x86 platforms.

What a "program" which contains only the declaration of
a procedure is intended to do ?
It cannot lead to anything executable ?

Maurice

--
        Maurice Lombardi
Laboratoire de  Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex     FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 51 45 44
mailto:Maurice.Lombardi@ujf-grenoble.fr