www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/09/29/08:24:22

Date: Thu, 29 Sep 1994 10:34:19 +0100
From: henrik AT dti DOT dk (Henrik Kullmann)
To: djgpp AT sun DOT soe DOT clarkson DOT edu

Compiling P2C

I have tried to compile the p2c ver. 1.20 with DJGPP, but i didn't succeed!
After several options to the compiler, I end up with 2 changes in p2c.h and
trans.h which compiles without errors. But the p2c program fails to translate
the test examples, WRITE, WRITELN and other symbols 'are not defined'

Below the changes and the errors from a run listed.

Any suggestions or better : where is the 'ready for work' version ?


Pierre Muller asked for GNU Pascal a few days ago, is that a successor of P2C ? 

Henrik Kullmann
DTI Process & Tooling Department


Changes in p2c.h

typedef struct  {
	FILE *f;
	FILEBUFNC(f,Char);
	Char name[_FNSIZE];
	} _TEXT;

/*
typedef struct char {
	FILE *f;
	FILEBUFNC(f,Char);
	Char name[_FNSIZE];
	} _TEXT;
*/

Changes in trans.h

/* Our library omits declarations for these functions! */
/*
int link           PP( (char *, char *) );
int unlink         PP( (char *) );
*/


Translating fact.p from test examples

C:\PROGRAM\DJGPP\P2C\EXAMPLES>..\src\p2c fact.p
fact, factorials
fact.p, line 23: Warning: Expected a ')', found a colon [227]  ( problem with ,i:1,)
fact.p, line 23: Warning: Symbol 'WRITELN' is not defined [221]


Translation completed.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019