Bug #1472089 - clearer first example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9288 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
92951b16c1
commit
5d40ec2692
2 changed files with 13 additions and 9 deletions
|
|
@ -207,9 +207,10 @@ Suppose that you defined a SWIG module such as the following:
|
||||||
|
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<pre>
|
<pre>
|
||||||
%module example
|
/* File: example.i */
|
||||||
|
%module test
|
||||||
%{
|
%{
|
||||||
#include "header.h"
|
#include "stuff.h"
|
||||||
%}
|
%}
|
||||||
int fact(int n);
|
int fact(int n);
|
||||||
</pre>
|
</pre>
|
||||||
|
|
@ -245,6 +246,11 @@ To change this, you can use the <tt>-o</tt> option.
|
||||||
It is also possible to change the <a href="SWIG.html#output">output directory </a> that the Java files are generated into using <tt>-outdir</tt>.
|
It is also possible to change the <a href="SWIG.html#output">output directory </a> that the Java files are generated into using <tt>-outdir</tt>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The following sections have further practical examples and details on how you might go about
|
||||||
|
compiling and using the generated files.
|
||||||
|
</p>
|
||||||
|
|
||||||
<H3><a name="java_commandline"></a>20.2.2 Additional Commandline Options</H3>
|
<H3><a name="java_commandline"></a>20.2.2 Additional Commandline Options</H3>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -165,9 +165,10 @@ Suppose that you defined a SWIG module such as the following:
|
||||||
|
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<pre>
|
<pre>
|
||||||
%module example
|
/* File: example.i */
|
||||||
|
%module test
|
||||||
%{
|
%{
|
||||||
#include "header.h"
|
#include "stuff.h"
|
||||||
%}
|
%}
|
||||||
int fact(int n);
|
int fact(int n);
|
||||||
</pre>
|
</pre>
|
||||||
|
|
@ -205,12 +206,9 @@ from the module name specified with <tt>%module</tt>. If the module name is <tt
|
||||||
a file <tt>example.py</tt> is created.
|
a file <tt>example.py</tt> is created.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H3><a name="Python_nn5"></a>29.2.2 Getting the right header files</H3>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In order to compile the C/C++ wrappers, the compiler needs the <tt>Python.h</tt> header file.
|
The following sections have further practical examples and details on how you might go about
|
||||||
This file is usually contained in a directory such as
|
compiling and using the generated files.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="diagram"><pre>
|
<div class="diagram"><pre>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue