070b5d
.\" First parameter, NAME, should be all caps
070b5d
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
070b5d
.\" other parameters are allowed: see man(7), man(1)
070b5d
.\" Manpage for swig.
070b5d
.TH SWIG 1 "2013-05-24"
070b5d
.SH NAME
070b5d
swig \- Simplified Wrapper and Interface Generator
070b5d
.SH SYNOPSIS
070b5d
.B swig
070b5d
.RI [ options ] " file"
070b5d
070b5d
.SH DESCRIPTION
070b5d
The swig command is used to create wrapper code to connect C and C++ code
070b5d
to scripting languages like Perl, Python, Tcl etc. from the definition of
070b5d
the interface.
070b5d
For detailed information on writing those interface definitions please
070b5d
refer to /usr/share/doc/swig-doc-2.0.9/Doc/Manual/index.html from the
070b5d
swig-doc package.
070b5d
This manpage concentrates on explaining the invocation of the swig command.
070b5d
070b5d
.SH OPTIONS
070b5d
.SS Target Language Options:
070b5d
.TP
070b5d
.B \-allegrocl
070b5d
Generate ALLEGROCL wrappers
070b5d
.TP
070b5d
.B \-chicken
070b5d
Generate CHICKEN wrappers
070b5d
.TP
070b5d
.B \-clisp
070b5d
Generate CLISP wrappers
070b5d
.TP
070b5d
.B \-cffi
070b5d
Generate CFFI wrappers
070b5d
.TP
070b5d
.B \-csharp
070b5d
Generate C# wrappers
070b5d
.TP
070b5d
.B \-d
070b5d
Generate D wrappers
070b5d
.TP
070b5d
.B \-go
070b5d
Generate Go wrappers
070b5d
.TP
070b5d
.B \-guile
070b5d
Generate Guile wrappers
070b5d
.TP
070b5d
.B \-java
070b5d
Generate Java wrappers
070b5d
.TP
070b5d
.B \-lua
070b5d
Generate Lua wrappers
070b5d
.TP
070b5d
.B \-modula3
070b5d
Generate Modula 3 wrappers
070b5d
.TP
070b5d
.B \-mzscheme
070b5d
Generate Mzscheme wrappers
070b5d
.TP
070b5d
.B \-ocaml
070b5d
Generate Ocaml wrappers
070b5d
.TP
070b5d
.B \-octave
070b5d
Generate Octave wrappers
070b5d
.TP
070b5d
.B \-perl
070b5d
Generate Perl wrappers
070b5d
.TP
070b5d
.B \-php
070b5d
Generate PHP wrappers
070b5d
.TP
070b5d
.B \-pike
070b5d
Generate Pike wrappers
070b5d
.TP
070b5d
.B \-python
070b5d
Generate Python wrappers
070b5d
.TP
070b5d
.B \-r
070b5d
Generate R (aka GNU S) wrappers
070b5d
.TP
070b5d
.B \-ruby
070b5d
Generate Ruby wrappers
070b5d
.TP
070b5d
.B \-sexp
070b5d
Generate Lisp S-Expressions wrappers
070b5d
.TP
070b5d
.B \-tcl
070b5d
Generate Tcl wrappers
070b5d
.TP
070b5d
.B \-uffi
070b5d
Generate Common Lisp / UFFI wrappers
070b5d
.TP
070b5d
.B \-xml
070b5d
Generate XML wrappers
070b5d
i
070b5d
070b5d
.SS General Options:
070b5d
.TP
070b5d
.B \-addextern
070b5d
Add extra extern declarations
070b5d
.TP
070b5d
.B \-c++
070b5d
Enable C++ processing
070b5d
.TP
070b5d
.BI "\-co " file
070b5d
Check \fIfile\fR out of the SWIG library
070b5d
.TP
070b5d
.B \-copyctor
070b5d
Automatically generate copy constructors wherever possible
070b5d
.TP
070b5d
.B \-cpperraswarn
070b5d
Treat the preprocessor #error statement as #warning (default)
070b5d
.TP
070b5d
.B \-copyright
070b5d
Display copyright notices
070b5d
.TP
070b5d
.B \-debug-classes
070b5d
Display information about the classes found in the interface
070b5d
.TP
070b5d
.BI "\-debug-module " n
070b5d
Display module parse tree at stages 1-4, \fIn\fR is a csv list of stages
070b5d
.TP
070b5d
.B \-debug-symtabs
070b5d
Display symbol tables information
070b5d
.TP
070b5d
.B \-debug-symbols
070b5d
Display target language symbols in the symbol tables
070b5d
.TP
070b5d
.B \-debug-csymbols
070b5d
Display C symbols in the symbol tables
070b5d
.TP
070b5d
.B \-debug-lsymbols
070b5d
Display target language layer symbols
070b5d
.TP
070b5d
.B \-debug-tags
070b5d
Display information about the tags found in the interface
070b5d
.TP
070b5d
.B \-debug-template
070b5d
Display information for debugging templates
070b5d
.TP
070b5d
.BI "\-debug-top " n
070b5d
Display entire parse tree at stages 1-4, \fIn\fR is a csv list of stages
070b5d
.TP
070b5d
.B \-debug-typedef
070b5d
Display information about the types and typedefs in the interface
070b5d
.TP
070b5d
.B \-debug-typemap
070b5d
Display typemap debugging information
070b5d
.TP
070b5d
.B \-debug-tmsearch
070b5d
Display typemap search debugging information
070b5d
.TP
070b5d
.B \-debug-tmused
070b5d
Display typemaps used debugging information
070b5d
.TP
070b5d
.B \-directors
070b5d
Turn on director mode for all the classes, mainly for testing
070b5d
.TP
070b5d
.B \-dirprot
070b5d
Turn on wrapping of protected members for director classes (default)
070b5d
.TP
070b5d
.BI \-D symbol
070b5d
Define a symbol \fIsymbol\fR (for conditional compilation)
070b5d
.TP
070b5d
.B \-E
070b5d
Preprocess only, does not generate wrapper code
070b5d
.TP
070b5d
.B \-external-runtime [file]
070b5d
Export the SWIG runtime stack
070b5d
.TP
070b5d
.BI "\-fakeversion " v
070b5d
Make SWIG fake the program version number to \fIv\fR
070b5d
.TP
070b5d
.B \-fcompact
070b5d
Compile in compact mode
070b5d
.TP
070b5d
.BI "\-features " list
070b5d
Set global features, where \fIlist\fR is a comma separated list of
070b5d
features, eg -features directors,autodoc=1
070b5d
If no explicit value is given to the feature, a default of 1 is used
070b5d
.TP
070b5d
.B \-fastdispatch
070b5d
Enable fast dispatch mode to produce faster overload dispatcher code
070b5d
.TP
070b5d
.B \-Fmicrosoft
070b5d
Display error/warning messages in Microsoft format
070b5d
.TP
070b5d
.B \-Fstandard
070b5d
Display error/warning messages in commonly used format
070b5d
.TP
070b5d
.B \-fvirtual
070b5d
Compile in virtual elimination mode
070b5d
.TP
070b5d
.B \-help
070b5d
This output
070b5d
.TP
070b5d
.B \-I-
070b5d
Don't search the current directory
070b5d
.TP
070b5d
.BI \-I dir
070b5d
Look for SWIG files in directory \fIdir\fR
070b5d
.TP
070b5d
.B \-ignoremissing
070b5d
Ignore missing include files
070b5d
.TP
070b5d
.B \-importall
070b5d
Follow all #include statements as imports
070b5d
.TP
070b5d
.B \-includeall
070b5d
Follow all #include statements
070b5d
.TP
070b5d
.BI \-l ifile
070b5d
Include SWIG library file \fIifile\fR
070b5d
.TP
070b5d
.B \-macroerrors
070b5d
Report errors inside macros
070b5d
.TP
070b5d
.B \-makedefault
070b5d
Create default constructors/destructors (the default)
070b5d
.TP
070b5d
.B \-M
070b5d
List all dependencies
070b5d
.TP
070b5d
.B \-MD
070b5d
Is equivalent to \(cq\&-M -MF \fIfile\fR\(cq\&, except \(cq\&-E\(cq\& is not implied
070b5d
.TP
070b5d
.BI "\-MF " file
070b5d
Generate dependencies into \fIfile\fR and continue generating wrappers
070b5d
.TP
070b5d
.B \-MM
070b5d
List dependencies, but omit files in SWIG library
070b5d
.TP
070b5d
.B \-MMD
070b5d
Like \(cq\&-MD\(cq\&, but omit files in SWIG library
070b5d
.TP
070b5d
.BI "\-module " name
070b5d
Set module name to \fIname\fR
070b5d
.TP
070b5d
.B \-MP
070b5d
Generate phony targets for all dependencies
070b5d
.TP
070b5d
.BI "\-MT " target
070b5d
Set the target of the rule emitted by dependency generation
070b5d
.TP
070b5d
.B \-nocontract
070b5d
Turn off contract checking
070b5d
.TP
070b5d
.B \-nocpperraswarn
070b5d
Do not treat the preprocessor #error statement as #warning
070b5d
.TP
070b5d
.B \-nodefault
070b5d
Do not generate default constructors nor default destructors
070b5d
.TP
070b5d
.B \-nodefaultctor
070b5d
Do not generate implicit default constructors
070b5d
.TP
070b5d
.B \-nodefaultdtor
070b5d
Do not generate implicit default destructors
070b5d
.TP
070b5d
.B \-nodirprot
070b5d
Do not wrap director protected members
070b5d
.TP
070b5d
.B \-noexcept
070b5d
Do not wrap exception specifiers
070b5d
.TP
070b5d
.B \-nofastdispatch
070b5d
Disable fast dispatch mode (default)
070b5d
.TP
070b5d
.B \-nopreprocess
070b5d
Skip the preprocessor step
070b5d
.TP
070b5d
.B \-notemplatereduce
070b5d
Disable reduction of the typedefs in templates
070b5d
.TP
070b5d
.B \-O
070b5d
Enable the optimization options:
070b5d
-fastdispatch -fvirtual
070b5d
.TP
070b5d
.BI "\-o " outfile
070b5d
Set name of the output file to \fIoutfile\fR
070b5d
.TP
070b5d
.B "\-oh " headfile
070b5d
Set name of the output header file to \fIheadfile\fR
070b5d
.TP
070b5d
.B \-outcurrentdir
070b5d
Set default output dir to current dir instead of input file's path
070b5d
.TP
070b5d
.BI "\-outdir " dir
070b5d
Set language specific files output directory to \fIdir\fR
070b5d
.TP
070b5d
.B \-pcreversion
070b5d
Display PCRE version information
070b5d
.TP
070b5d
.B \-small
070b5d
Compile in virtual elimination & compact mode
070b5d
.TP
070b5d
.B \-swiglib
070b5d
Report location of SWIG library and exit
070b5d
.TP
070b5d
.B \-templatereduce
070b5d
Reduce all the typedefs in templates
070b5d
.TP
070b5d
.B \-v
070b5d
Run in verbose mode
070b5d
.TP
070b5d
.B \-version
070b5d
Display SWIG version number
070b5d
.TP
070b5d
.B \-Wall
070b5d
Remove all warning suppression, also implies -Wextra
070b5d
.TP
070b5d
.B \-Wallkw
070b5d
Enable keyword warnings for all the supported languages
070b5d
.TP
070b5d
.B \-Werror
070b5d
Treat warnings as errors
070b5d
.TP
070b5d
.B \-Wextra
070b5d
Adds the following additional warnings: 202,309,403,512,321,322
070b5d
.TP
070b5d
.BI \-w list
070b5d
Suppress/add warning messages, eg -w401,+321
070b5d
see Warnings.html
070b5d
.TP
070b5d
.B "\-xmlout " file
070b5d
Write XML version of the parse tree to \fIfile\fR after normal processing
070b5d
070b5d
.SS Tcl 8 Options (available with -tcl)
070b5d
.TP
070b5d
.B \-itcl
070b5d
Enable ITcl support
070b5d
.TP
070b5d
.B \-nosafe
070b5d
Leave out SafeInit module function.
070b5d
.TP
070b5d
.BI "\-prefix " name
070b5d
Set a prefix \fIname\fR to be prepended to all names
070b5d
.TP
070b5d
.B \-namespace
070b5d
Build module into a Tcl 8 namespace
070b5d
.TP
070b5d
.B \-pkgversion
070b5d
Set package version
070b5d
070b5d
.PP
070b5d
Note: 'swig -\fIlang\fR -help' displays options for a specific target language.
070b5d
070b5d
.SH AUTHOR
070b5d
SWIG was originally created by David Beazley. For up-to-date information
070b5d
about authors and contributors please check http://www.swig.org/guilty.html.
070b5d
This manual page was written by Torsten Landschoff <torsten@debian.org> and
070b5d
updated by Jitka Plesnikova <jplesnik@redhat.com> (but may be used by others).
070b5d