Sophie

Sophie

distrib > Mandriva > 9.1 > i586 > by-pkgid > 3c88344d1f3d15057277d028d0022277 > files > 760

swig-1.3.11-4mdk.i586.rpm

<html>
<head>
<title>SWIG:Examples:tcl</title>
</head>

<body bgcolor="#ffffff">
<H1>SWIG Tcl Examples</H1>

<tt>$Header: /cvs/projects/SWIG/Examples/tcl/index.html,v 1.7.4.2 2001/12/08 23:33:37 cheetah Exp $</tt><br>

<p>
The following examples illustrate the use of SWIG with Tcl.

<ul>
<li><a href="simple/index.html">simple</a>.  A minimal example showing how SWIG can
be used to wrap a C function and a global variable.
<li><a href="constants/index.html">constants</a>.  This shows how preprocessor macros and
certain C declarations are turned into constants.
<li><a href="variables/index.html">variables</a>.  How SWIG can be used to wrap C global variables.
<li><a href="value/index.html">value</a>. How to pass and return structures by value.
<li><a href="class/index.html">class</a>. How wrap a simple C++ class.
<li><a href="reference/index.html">reference</a>. C++ references.
<li><a href="pointer/index.html">pointer</a>. Simple pointer handling.
<li><a href="funcptr/index.html">funcptr</a>. Pointers to functions.
</ul>

<h2>Compilation Issues</h2>

<ul>
<li>To create a Tcl extension, SWIG is run with the following options:

<blockquote>
<pre>
% swig -tcl interface.i
</pre>
</blockquote>

<li>
Please see the <a href="../../Doc/Manual/Windows.html">Windows</a> page in the main manual for information on using the examples on Windows. <p>
</li>

<li>The compilation of examples is done using the file <tt>Example/Makefile</tt>.  This
makefile performs a manual module compilation which is platform specific.  Typically,
the steps look like this (Linux):

<blockquote>
<pre>
unix % swig -tcl interface.i
unix % gcc -fpic -c interface_wrap.c -I/usr/local/include
unix % gcc -shared interface_wrap.o $(OBJS) -o interface.so
unix % tclsh8.3
% load ./interface.so
% blah ...
</pre>
</blockquote>
</ul>

<h2>Compatibility</h2>

The examples have been extensively tested on the following platforms:

<ul>
<li>Linux
<li>Solaris
</ul>

Your mileage may vary.  If you experience a problem, please let us know by 
sending a message to <a href="mailto:swig-dev@cs.uchicago.edu">swig-dev@cs.uchicago.edu</a>.
</body>
</html>