Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 2fc07611b08d4a735fd34d5eb60d8e16 > files > 2066

ciao-1.10p8-3mdv2010.0.i586.rpm

<HTML>
<HEAD>
<!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 -->

<LINK rel="stylesheet" href="ciao.css" type="text/css">
<TITLE>The Ciao Prolog System               - Utilities for on-demand compilation of foreign files</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_121.html">previous</A>, <A HREF="ciao_123.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC528" HREF="ciao_toc.html#TOC528">Utilities for on-demand compilation of foreign files</A></H1>
<P>
<A NAME="IDX5892"></A>


<P>
<STRONG>Author(s):</STRONG> Manuel Carro, Jose Morales.


<P>
<STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST)


<P>
<STRONG>Version of last change:</STRONG> 1.3#36 (1999/7/20, 10:37:31 MEST)


<P>
This module provides two predicates which give the user information regarding how to compile external (C) files in order to link them with the Ciao Prolog engine at runtime. 


<P>
These predicates are not intended to be called directly by the end-user. Instead, a tool or module whose aim is generating dynamically loadable files from source files should use the predicates in this file in order to find out what are the proper compiler and linker to use, and which options must be passed to them in the current architecture.



<UL>
<LI><A HREF="ciao_122.html#SEC529">Usage and interface (foreign_compilation)</A>
<LI><A HREF="ciao_122.html#SEC530">Documentation on exports (foreign_compilation)</A>
</UL>



<H2><A NAME="SEC529" HREF="ciao_toc.html#TOC529">Usage and interface (<CODE>foreign_compilation</CODE>)</A></H2>

<div class="cartouche">

<UL>

<LI><STRONG>Library usage:</STRONG>

<CODE>:- use_module(library(foreign_compilation)).</CODE>

<LI><STRONG>Exports:</STRONG>


<UL>

<LI><EM>Predicates:</EM>

<A NAME="IDX5893"></A>
<CODE>compiler_and_opts/2</CODE>, 
<A NAME="IDX5894"></A>
<CODE>linker_and_opts/2</CODE>.

</UL>

<LI><STRONG>Other modules used:</STRONG>


<UL>

<LI><EM>System library modules:</EM>

<A NAME="IDX5895"></A>
<CODE>system</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC530" HREF="ciao_toc.html#TOC530">Documentation on exports (<CODE>foreign_compilation</CODE>)</A></H2>
<P>
<A NAME="IDX5896"></A>
<A NAME="IDX5897"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>compiler_and_opts/2:</B>
<DD><A NAME="IDX5898"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>compiler_and_opts(?Compiler, ?Opts)</CODE>

<UL>
<LI><EM>Description:</EM> If you want to compile a foreign language file for dynamic linking in the current operating system and architecture, you have to use the compiler <CODE>Compiler</CODE> and give it the options <CODE>Opts</CODE>. A variable in <CODE>Opts</CODE> means that no special option is needed.

<LI><EM>The following properties should hold at call time:</EM>

<CODE>?Compiler</CODE> is currently instantiated to an atom.
 (<CODE>term_typing:atom/1</CODE>)

<CODE>?Opts</CODE> is a list of <CODE>atom</CODE>s.
 (<CODE>basic_props:list/2</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX5899"></A>
<A NAME="IDX5900"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>linker_and_opts/2:</B>
<DD><A NAME="IDX5901"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>linker_and_opts(?Linker, ?Options)</CODE>

<UL>
<LI><EM>Description:</EM> If you want to link a foreign language file for dynamic linking in the current operating system and architecture, you have to use the linker <CODE>Compiler</CODE> and gite it the options <CODE>Opts</CODE>. A variable in <CODE>Opts</CODE> means that no special option is needed.

<LI><EM>The following properties should hold at call time:</EM>

<CODE>?Linker</CODE> is currently instantiated to an atom.
 (<CODE>term_typing:atom/1</CODE>)

<CODE>?Options</CODE> is a list of <CODE>atom</CODE>s.
 (<CODE>basic_props:list/2</CODE>)
</UL>

</DL>

<P><HR><P>
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_121.html">previous</A>, <A HREF="ciao_123.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
</BODY>
</HTML>