~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Examples/tcl/index.html

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Landschoff
  • Date: 2002-03-29 01:56:07 UTC
  • Revision ID: james.westby@ubuntu.com-20020329015607-c0wt03xu8oy9ioj7
Tags: upstream-1.3.11
ImportĀ upstreamĀ versionĀ 1.3.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<head>
 
3
<title>SWIG:Examples:tcl</title>
 
4
</head>
 
5
 
 
6
<body bgcolor="#ffffff">
 
7
<H1>SWIG Tcl Examples</H1>
 
8
 
 
9
<tt>$Header: /cvs/projects/SWIG/Examples/tcl/index.html,v 1.7.4.2 2001/12/08 23:33:37 cheetah Exp $</tt><br>
 
10
 
 
11
<p>
 
12
The following examples illustrate the use of SWIG with Tcl.
 
13
 
 
14
<ul>
 
15
<li><a href="simple/index.html">simple</a>.  A minimal example showing how SWIG can
 
16
be used to wrap a C function and a global variable.
 
17
<li><a href="constants/index.html">constants</a>.  This shows how preprocessor macros and
 
18
certain C declarations are turned into constants.
 
19
<li><a href="variables/index.html">variables</a>.  How SWIG can be used to wrap C global variables.
 
20
<li><a href="value/index.html">value</a>. How to pass and return structures by value.
 
21
<li><a href="class/index.html">class</a>. How wrap a simple C++ class.
 
22
<li><a href="reference/index.html">reference</a>. C++ references.
 
23
<li><a href="pointer/index.html">pointer</a>. Simple pointer handling.
 
24
<li><a href="funcptr/index.html">funcptr</a>. Pointers to functions.
 
25
</ul>
 
26
 
 
27
<h2>Compilation Issues</h2>
 
28
 
 
29
<ul>
 
30
<li>To create a Tcl extension, SWIG is run with the following options:
 
31
 
 
32
<blockquote>
 
33
<pre>
 
34
% swig -tcl interface.i
 
35
</pre>
 
36
</blockquote>
 
37
 
 
38
<li>
 
39
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>
 
40
</li>
 
41
 
 
42
<li>The compilation of examples is done using the file <tt>Example/Makefile</tt>.  This
 
43
makefile performs a manual module compilation which is platform specific.  Typically,
 
44
the steps look like this (Linux):
 
45
 
 
46
<blockquote>
 
47
<pre>
 
48
unix % swig -tcl interface.i
 
49
unix % gcc -fpic -c interface_wrap.c -I/usr/local/include
 
50
unix % gcc -shared interface_wrap.o $(OBJS) -o interface.so
 
51
unix % tclsh8.3
 
52
% load ./interface.so
 
53
% blah ...
 
54
</pre>
 
55
</blockquote>
 
56
</ul>
 
57
 
 
58
<h2>Compatibility</h2>
 
59
 
 
60
The examples have been extensively tested on the following platforms:
 
61
 
 
62
<ul>
 
63
<li>Linux
 
64
<li>Solaris
 
65
</ul>
 
66
 
 
67
Your mileage may vary.  If you experience a problem, please let us know by 
 
68
sending a message to <a href="mailto:swig-dev@cs.uchicago.edu">swig-dev@cs.uchicago.edu</a>.
 
69
</body>
 
70
</html>
 
71
 
 
72