/usr/share/mozart/doc/tools/node14.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>6 The Oz DLL Builder: oztool</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node13.html#chapter.profiler"><< Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node15.html#chapter.convert">Next >></A></TD></TR></TABLE><DIV id="chapter.oztool"><H1><A name="chapter.oztool">6 The Oz DLL Builder: <CODE>oztool</CODE></A></H1><P><CODE>oztool</CODE> facilitates the creation of native functors (see <A href="../apptut/node19.html#part.foreign.extensions">Part VI of ``Application Programming''</A> and <A href="../foreign/index.html">``Interfacing to C and C++''</A>). A native functor is a DLL, i. e. a library that is dynamically loaded by the Oz emulator and interfaces with it. Creating a native functor often involves complicated compilation and linking technicalities (e. g. options). <CODE>oztool</CODE> takes care of these details for you. </P><DL><DT><CODE>oztool c++ ...</CODE></DT><DD><P>Instead of calling the C++ compiler directly, you should invoke it through <CODE>oztool</CODE>. The advantages are: it calls the right compiler, with the right options, and also extends the include search path to find the Mozart specific includes such as <CODE>mozart.h</CODE>. Normally, you would compile a native functor implemented in <CODE>foo.cc</CODE> using: </P><BLOCKQUOTE class="code"><CODE>oztool c++ -c foo.cc</CODE></BLOCKQUOTE><P> </P></DD><DT><CODE>oztool cc ...</CODE></DT><DD><P>Same idea, but for the C compiler </P></DD><DT><CODE>oztool ld ...</CODE></DT><DD><P>Instead of calling the linker directly, you should also invoke it through <CODE>oztool</CODE>. Again, the advantages are that it calls the right linker, with the right options. Normally, you would create a DLL from <CODE>foo.o</CODE> as follows: </P><BLOCKQUOTE class="code"><CODE>oztool ld -o foo.so foo.o</CODE></BLOCKQUOTE><P> </P></DD><DT><CODE>oztool platform</CODE></DT><DD><P>The default <A href="../system/node50.html#chapter.resolve">Resolution</A> mechanism locates architecture specific DLLs as follows: If the system needs a native functor called (abstractly) <CODE>foo.so</CODE>, then it will look for a DLL called <CODE>foo.so-linux-i486</CODE> on a Linux machine, <CODE>foo.so-solaris-sparc</CODE> on a Solaris machine, or <CODE>foo.so-win32</CODE> on a Windows machine, etc... Thus, when you create a DLL, you should install it with a name where the machine's architecture is appended. Invoking <CODE>oztool platform</CODE> simply prints out the appropriate architecture name for your machine. In this respect, <CODE>oztool</CODE> helps you write portable Makefiles: to create a DLL from file <CODE>foo.cc</CODE> you would normally invoke: </P><BLOCKQUOTE class="code"><CODE>oztool c++ -c foo.cc<BR>oztool ld -o foo.so-`oztool platform` foo.o</CODE></BLOCKQUOTE><P></P></DD></DL><P></P><DIV id="section.oztool-env"><H2><A name="section.oztool-env">6.1 Windows Environment Variables</A></H2><P>Under Windows, <CODE>oztool</CODE> supports the use of several compilers as described in <A href="../foreign/node5.html#chapter.windll">Chapter 5 of ``Interfacing to C and C++''</A>. Furthermore, when using the GNU compiler suite, the exact name of the compilers and linker to invoke can be set by the environment variables shown in the following table with their default values. </P><TABLE align="center" class="dyptic"><TR valign="top"><TH><P>Environment Variable</P></TH><TH><P>Default Value</P></TH></TR><TR valign="top"><TD><P><A name="label13"></A><A name="label14"></A><CODE>OZTOOL_CC</CODE></P></TD><TD><P><CODE>gcc -mno-cygwin</CODE></P></TD></TR><TR valign="top"><TD><P><A name="label15"></A><A name="label16"></A><CODE>OZTOOL_CXX</CODE></P></TD><TD><P><CODE>g++ -mno-cygwin</CODE></P></TD></TR><TR valign="top"><TD><P><A name="label17"></A><A name="label18"></A><CODE>OZTOOL_LD</CODE></P></TD><TD><P><CODE>g++ -mno-cygwin</CODE></P></TD></TR></TABLE><P> </P><P>These values correspond to the compilers used to build Mozart. The above binaries are provided by the Cygwin <CODE>gcc</CODE> package. Note that using a different compiler can lead to problems, as described in <A href="../foreign/node5.html#section.compilerproblems">Section 5.1 of ``Interfacing to C and C++''</A>.</P></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node13.html#chapter.profiler"><< Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node15.html#chapter.convert">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif Kornstaedt</A> and <A href="http://www.ps.uni-sb.de/~schulte/">Christian Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|