[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ffi to MCL

>Date: Thu, 19 Nov 92 17:24:03 EST
>From: staley@carnap.srl.ford.com (Scott M. Staley)
>To: bill@cambridge.apple.com
>Subject: Re: ffi to MCL
>> From bill@cambridge.apple.com Thu Nov 19 13:35:20 1992
>> Date: Thu, 19 Nov 1992 13:41:52 -0600
>> To: staley@carnap.srl.ford.com (Scott M. Staley)
>> From: bill@cambridge.apple.com (Bill St. Clair)
>> Sender: bill@cambridge.apple.com (Unverified)
>> Subject: Re: ffi to MCL
>> Cc: bill@cambridge.apple.com
>> Content-Length: 1178
>> >Bill.
>> >
>> >I posted a question to the info-mcl a while back and got no takers so 
>> >I thought I would try you direct. I am looking to get a C compiler to
>> >write c code to link with mcl. There is something in the MCL manual about
>> >c compiler must generate mpw compatible .o files. What does that entail?
>> >
>> >Does it mean the mpw is the only C I can use the ffi with, or could 
>> >Think C or others be used. What do you recommend to write C code for MCL.
>> >
>> >I have no desire to but a c compiler to write plain c. My only purpose is
>> >to hook to MCL.
>> I have heard that Think Pascal is able to import Think C projects and
>> write MPW compatible libraries, but I have never done it. I know of no
>> other way to make Think C generate object files that MCL's FFI knows
>> how to parse.
>> One other way to run Think C generated code from MCL is to create a
>> code resource. Guillaume Cartier has written some code to simplify finding
>> entry points in this code resource. His code is on the MCL 2.0 CD in
>> the folder:
>>    MCL 2.0 CD:User Contributed Code:Think C Interface:
>> It is also available for anonymous FTP from cambridge.apple.com in the file:
>>   /pub/mcl2/contrib/Cartiers-Contribs-1.2.sea.hqx
>Thanks for the come back. Can you say what is the minimimum mpw C stuff I
>should buy to do the above. Also I might mention that the C code I hope
>to integrate is in ANSI C.

I know very little about developing C on the Macintosh. I used Think C
two or three years ago to do a small project, and have used MPW a little
bit to assemble MCL's kernel, but that is the extent of my experience.
 From looking at the November, 1992 APDA catalog, I would guess that you would
need to get the MPW C Bundle, which was listed for $425. The description of
the MPW C compiler version 3.2.4 says "The MPW C compiler supports K&R C,
as well as many ANSI extensions to C, including function prototypes and strong type checking. It includes a standard C library that offers the functions
described in the ANSI C standard." I do not know if "many ANSI extensions"
means that it will have problems with your "ANSI C", nor do I know if
Think C is closer to the ANSI standard (or if that will matter for your
code), or how the effort involved in building Think C stubs using Guillaume
Cartier's package compares to writing DEFFCFUN stubs to interface to MPW C.

Can someone else help out?