Documentation: terminology consistency for command line options plus Doxygen tweaks.
This commit is contained in:
parent
7bb7ff6f95
commit
fb0adb14c3
4 changed files with 18 additions and 18 deletions
|
|
@ -56,7 +56,7 @@
|
|||
<H2><a name="D_command_line_invocation">23.2 Command line invocation</a></H2>
|
||||
|
||||
|
||||
<p>To activate the D module, pass the <tt>-d</tt> option to SWIG at the command line. The same standard command line switches as with any other language module are available, plus the following D specific ones:</p>
|
||||
<p>To activate the D module, pass the <tt>-d</tt> option to SWIG at the command line. The same standard command line options as with any other language module are available, plus the following D specific ones:</p>
|
||||
|
||||
<dl>
|
||||
<dt><tt>-d2</tt></dt>
|
||||
|
|
@ -66,8 +66,8 @@
|
|||
|
||||
<dt><a name="D_splitproxy"></a><tt>-splitproxy</tt></dt>
|
||||
<dd>
|
||||
<p>By default, SWIG generates two D modules: the <em>proxy</em> module, named like the source module (either specified via the <tt>%module</tt> directive or via the <tt>module</tt> command line switch), which contains all the proxy classes, functions, enums, etc., and the <em>intermediary</em> module (named like the proxy module, but suffixed with <tt>_im</tt>), which contains all the <tt>extern(C)</tt> function declarations and other private parts only used internally by the proxy module.</p>
|
||||
<p>If the split proxy mode is enabled by passing this switch at the command line, all proxy classes and enums are emitted to their own D module instead. The main proxy module only contains free functions and constants in this case.</p>
|
||||
<p>By default, SWIG generates two D modules: the <em>proxy</em> module, named like the source module (either specified via the <tt>%module</tt> directive or via the <tt>module</tt> command line option), which contains all the proxy classes, functions, enums, etc., and the <em>intermediary</em> module (named like the proxy module, but suffixed with <tt>_im</tt>), which contains all the <tt>extern(C)</tt> function declarations and other private parts only used internally by the proxy module.</p>
|
||||
<p>If the split proxy mode is enabled by passing this option at the command line, all proxy classes and enums are emitted to their own D module instead. The main proxy module only contains free functions and constants in this case.</p>
|
||||
</dd>
|
||||
|
||||
<dt><tt>-package <pkg></tt></dt>
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
<dt><tt>-wrapperlibrary <wl></tt></dt>
|
||||
<dd>
|
||||
<p>The code SWIG generates to dynamically load the C/C++ wrapper layer looks for a library called <tt>$module_wrap</tt> by default. With this switch, you can override the name of the file the wrapper code loads at runtime (the <tt>lib</tt> prefix and the suffix for shared libraries are appended automatically, depending on the OS).</p>
|
||||
<p>The code SWIG generates to dynamically load the C/C++ wrapper layer looks for a library called <tt>$module_wrap</tt> by default. With this option, you can override the name of the file the wrapper code loads at runtime (the <tt>lib</tt> prefix and the suffix for shared libraries are appended automatically, depending on the OS).</p>
|
||||
<p>This might especially be useful if you want to invoke SWIG several times on separate modules, but compile the resulting code into a single shared library.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ These structural commands are stripped out by SWIG and are not assigned to anyth
|
|||
|
||||
<p>
|
||||
Doxygen comments translation is disabled by default and needs to be explicitly
|
||||
enabled using the command line <tt>-doxygen</tt> switch for the languages that
|
||||
enabled using the command line <tt>-doxygen</tt> option for the languages that
|
||||
do support it (currently Java and Python).
|
||||
</p>
|
||||
|
||||
|
|
@ -1639,12 +1639,12 @@ TO BE ADDED.
|
|||
|
||||
|
||||
<p>
|
||||
When running SWIG with command line switch <tt>-doxygen</tt>, it may happen
|
||||
When running SWIG with command line option <tt>-doxygen</tt>, it may happen
|
||||
that SWIG will fail to parse the code, which is valid C++ code and
|
||||
is parsed without problems without the switch. The problem is,
|
||||
that Doxygen comments are not tokens (C/C++ compiler actually never
|
||||
is parsed without problems without the option. The problem is,
|
||||
that Doxygen comments are not tokens (the C/C++ compiler actually never
|
||||
sees them) and that they can appear anywhere in the code. That's why it is
|
||||
practically impossible to handle all corner cases with parser.
|
||||
practically impossible to handle all corner cases with the parser.
|
||||
However, these problems can usually be avoided by minor changes in the
|
||||
code or comment. Known problems and solutions are shown in this section.
|
||||
</p>
|
||||
|
|
@ -1652,8 +1652,8 @@ code or comment. Known problems and solutions are shown in this section.
|
|||
|
||||
<p>
|
||||
Recommended approach is to first run SWIG without command line
|
||||
switch <tt>-doxygen</tt>. When it successfully processes the code,
|
||||
include the switch and fix problems with Doxygen comments.
|
||||
option <tt>-doxygen</tt>. When it successfully processes the code,
|
||||
include the option and fix problems with Doxygen comments.
|
||||
</p>
|
||||
|
||||
|
||||
|
|
@ -1661,8 +1661,8 @@ include the switch and fix problems with Doxygen comments.
|
|||
|
||||
|
||||
<p>
|
||||
Inserting conditional compilation preprocessor directive between
|
||||
Doxygen comment and commented item may break parsing:
|
||||
Inserting a conditional compilation preprocessor directive between a
|
||||
Doxygen comment and a commented item may break parsing:
|
||||
</p>
|
||||
|
||||
|
||||
|
|
@ -1680,7 +1680,7 @@ class A {
|
|||
</pre></div>
|
||||
|
||||
<p>
|
||||
Solution is to move the directive above comment:
|
||||
The solution is to move the directive above the comment:
|
||||
</p>
|
||||
|
||||
<div class="code"><pre>
|
||||
|
|
@ -1734,7 +1734,7 @@ example, <tt>JavaDocConverter</tt> is the Javadoc module class.
|
|||
|
||||
|
||||
<p>
|
||||
There are two handy command line switches, that enable lots of
|
||||
There are two handy command line options, that enable lots of
|
||||
detailed debug information printing.
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: exampleJNI.gcd(II)I
|
|||
<p>
|
||||
where <tt>gcd</tt> is the missing JNI function that SWIG generated into the wrapper file.
|
||||
Also make sure you pass all of the required libraries to the linker.
|
||||
The <tt>java -verbose:jni</tt> commandline switch is also a great way to get more information on unresolved symbols.
|
||||
The <tt>java -verbose:jni</tt> commandline option is also a great way to get more information on unresolved symbols.
|
||||
One last piece of advice is to beware of the common faux pas of having more than one native library version in your path.
|
||||
</p>
|
||||
|
||||
|
|
@ -645,7 +645,7 @@ java::
|
|||
<p>
|
||||
To build the DLL and compile the java code, run NMAKE (you may need to run <tt>vcvars32</tt> first).
|
||||
This is a pretty simplistic Makefile, but hopefully its enough to get you started.
|
||||
Of course you may want to make changes for it to work for C++ by adding in the -c++ command line switch for swig and replacing .c with .cxx.
|
||||
Of course you may want to make changes for it to work for C++ by adding in the -c++ command line option for swig and replacing .c with .cxx.
|
||||
</p>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ would generate
|
|||
|
||||
<p>
|
||||
Like many compilers, SWIG supports a <tt>-E</tt> command line option to display the output from the preprocessor.
|
||||
When the <tt>-E</tt> switch is used, SWIG will not generate any wrappers.
|
||||
When the <tt>-E</tt> option is used, SWIG will not generate any wrappers.
|
||||
Instead the results after the preprocessor has run are displayed.
|
||||
This might be useful as an aid to debugging and viewing the results of macro expansions.
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue