by Waldek Hebisch <hebisch@[EMAIL PROTECTED]
>
May 29, 2007 at 01:22 AM
In comp.lang.pascal.misc Louie <jlrn77@[EMAIL PROTECTED]
> wrote:
> On May 28, 8:50 am, Waldek Hebisch <hebi...@[EMAIL PROTECTED]
> wrote:
> >
> > If C source requires 'gpctypes.h' then 'gpctypes.h' should be
considered
> > part of C source -- if you miss it the source you get is incomplete.
> >
> > You should first ask provider of C source about 'gpctypes.h'. If
> > that fails you will have to re-create 'gpctypes.h', but that depends
> > on C source: we can not just guess what C source expects.
> >
>
> I was afraid that something like this would happen...
>
> What about compiling the GPCtypes.pas distributed with GPC and then
I do not see GPCtypes.pas in my GPC installation.
> making a call from within GCC? Has anyone tried to include Pascal
> libraries into GCC programs?
>
Sure. GPC has very simple mapping between C and Pascal types. But
the catch is that both in C and in Pascal you may define your own
types. Translating type definitions between C and Pascal is not
hard. However, since neither C compiler can can read Pascal nor Pascal
compiler can read C one has to do translation by hand (or use
some extra tool, but I can not recommend any).
GPC distribution contains an example (gpc_c_c.c + corresponding
Pascal files) of linking Pascal routines to C.
--
Waldek Hebisch
hebisch@[EMAIL PROTECTED]