Function
link-load
process-foreign-file files &key dff language preprocess preprocessor preprocessor-options virtual-functions accessors case-sensitive c-code-control resolve-errors =>
One or more filenames.
A filename.
One of:c++,:g++,:arm, or:any-c++.
A boolean.
A string.
A string.
A boolean.
A boolean.
See description.
One of:fasl,:object, or:source.
A boolean.
process-foreign-file function takes a file or files of foreign declarations -- usually header files -- and parses them, producing 'dff' files of Lisp calls todefine-foreign-function,define-foreign-variable,define-foreign-type, and so on, that will, when compiled, produce a Lisp interface to the foreign code. process-foreign-file will use a preprocessor program specified by the variablesystem::*preprocessor*. The default value is/lib/cpp. .h). nil, in which case the dff file will be source-file-name-dff.lisp. (See files, above.) :c++,:g++ (both GNUg++ compiler-compatible),:arm (ARM C++/AT&T/Lucid compatible),:c (standard C header files), and:any-c++ (any C++ variety). By default this is:any-c++. nil, runs the preprocessor on the input files. The default value ist. ccl:*preprocessor*. ccl:*preprocessor-options*. nil, will assume that all C++ member functions are virtual. This creates separate caller stubs for each function. You will need to set this tot if you want to interface to any form of virtual function. This option will also enable interfacing to inline functions. LispWorks does not attempt to interface to the internals of virtual method dispatching. By default this ist. t, ensures accessors are created for all class slots. Ifnil, neither reader nor writer functions are created. The default value ist. t -- the names of all Lisp functions and classes created are of the form |name|.nil -- all foreign names are converted to uppercase and an error is signalled if any name clashes occur as a result of this conversion. For example,OneTwoTHREE becomesONETWOTHREE.:split-name -- attempts to split the name up into something sensible. For example,OneTwoTHREE becomesONE-TWO-THREE.:prefix -- changes lowercase to uppercase and concatenates the string with the string held insys:*prefix-name-string*. For example,OneTwoTHREE becomesFOREIGN-ONETWOTHREE.(list :user-routinefunction-name) -- enables you to pass your own function for name formatting. Your function must take a string argument and return a string result. It is not advised to use destructive functions (e.g.nreverse) as this may cause unusual side effects.*case-sensitive*. :fasl,:object or:source.The default value is*c-code-control*. This control keyword is used when emitting theprocess-cpp-codedefinition. nil, creates null structures for all undefined foreign datatypes. The default value isnil. (process-cpp-file "test.h" :accessors t :case-sensitive nil) ; This creates the dff-file test-dff.lisp, which ; contains the necessary foreign definitions for ; declaration in test.h. (compile-file "test-dff" :load t) ;; compile and load test-dff.lisp (read-foreign-modules "test.o") ;; load original object module