[Openmcl-devel] Creating FFI interface in Darwin x86-32

Gary Byers gb at clozure.com
Fri Mar 27 08:54:10 PDT 2009


The way that this has always worked is that:

1) the populate.sh script tells the translator (ffigen, invoked via 
h-to-ffi.sh) to parse one or more .h files into corresponding .ffi 
files.

2) A lisp function (named PARSE-STANDARD-FFI-FILES - defined in
"ccl:library;parse-ffi.lisp") reads the .ffi file(s) produced in
the first step and creates .cdb files.

It's sometimes necessary to run the second step twice (to resolve
things that were forward-referenced.)

If you have the translator installed and the populate.sh script set
up, you can run all of the steps enough times by doing something like:

? (ccl:create-interfaces :midishare)




On Fri, 27 Mar 2009, Stéphane Letz wrote:

>
> Le 27 mars 09 à 15:50, Gary Byers a écrit :
>
>> See:
>> 
>> <http://trac.clozure.com/openmcl/wiki/BuildFFIGEN>
>> 
>> 
>
> Thanks,
>
> I did that wand the populate.sh create something like :
>
> darwin-x86-headers/midishare/C/System/Library/Frameworks/MidiShare.framework/Versions/A/Headers/MidiShare.ffi
>
> I seems the files xxx.cdb are not create anymore?? (constants.cdb, 
> functions.cdb...)
>
> Then i did : (rebuild-ccl :full t) (quit) (require 'cocoa-application) to 
> recreate an appl, then loading our interface file gives error like:
>
> Error: Foreign function not found: X86-DARWIN32::|MidiGetVersion|
>> While executing: CCL::LOAD-EXTERNAL-FUNCTION, in process Listener(6).
>> Type :POP to abort, :R for a list
>
>
> So one step it still missing?
>
> Thanks,
>
> Stephane Letz


More information about the Openmcl-devel mailing list