Next: , Previous: , Up: Calling C from Prolog   [Contents][Index]

6.2.5 The Foreign Resource Linker

The foreign resource linker, splfr, is used for creating foreign resources (see Foreign Resources). splfr reads terms from a Prolog file extracting any foreign_resource/2 fact with first argument matching the resource name and all foreign/[2,3] facts. Based on this information, it generates the necessary glue code, including a header file that the user code should include, and combines it with any additional C or object files provided by the user into a linked foreign resource. The output file name will be the resource name with a suitable extension.

Note that no pathnames passed to splfr should contain spaces. Under Windows, this can be avoided by using the short version of pathnames as necessary.

See too-splfr for detailed information about splfr options etc..

Send feedback on this subject.