Using p2c for the UTICPC
Created September 19, 1997
Yes, the UTICPC still supports Pascal. We use p2c to translate
to C, and then compile the resulting C code with gcc.
Here's how to use p2c on CDF, with an example program prog.p:
You may want to encapsulate this procedure with a shell script.
- Make sure ~contest/publicbin is on your path so that you
can find the p2c program.
You need this in your path to get
the submission and other scripts anyway.
- Translate prog.p to prog.c with the following command:
- Compile the prog.c with the following options to get the
Pascal library code and header file, e.g.:
gcc -o prog prog.c ~contest/p2c/libp2c.a -I/homes/u2/contest/contest
- You should now have an executable program file prog.
Fri Sep 19 11:00:02 EDT 1997