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