File: Swig

package info (click to toggle)
plplot 5.14.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 30,424 kB
  • sloc: ansic: 79,613; xml: 28,583; cpp: 20,037; ada: 19,456; tcl: 12,081; f90: 11,423; ml: 7,276; java: 6,863; python: 6,792; sh: 3,185; perl: 828; lisp: 75; makefile: 48; sed: 33; fortran: 5
file content (61 lines) | stat: -rw-r--r-- 2,483 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!---
N.B.  The definitive Markdown source of this file is located in the
doc/wiki_source subdirectory of the PLplot source tree.  So only use
the ctrl-v and delete capabilities of the GUI file editor at
SourceForge to make changes to the SourceForge version of this file,
where ctrl-v is used to complete a cut and paste from the definitive
version of this file in the PLplot source tree that is being edited
with your favorite file editor, and delete used to remove extraneous
unmodified text whose changed form has been copied with the cut and
paste.
-->

Description
-----------

[SWIG](http://www.swig.org/) is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of languages including common scripting languages such as Perl, PHP, Python, Tcl and Ruby.

Instructions for Mac OS X
-------------------------

-   The SWIG executable which is provided by Apple (*/usr/bin/swig*, version 1.3.31) is too old, at least for the [Lua](Lua "wikilink") bindings. For Python and Java there is maybe no need to install a new version of SWIG.
-   Download [SWIG 1.3.40 tar file](http://sourceforge.net/projects/swig/files/swig/swig-1.3.40/swig-1.3.40.tar.gz/download)
-   Untar *swig-1.3.40.tar.gz* into a folder of your choice
-   Cd into the folder and create a build folder

`mkdir build`
`cd build`

-   Configure, build and install SWIG. Omit the *--prefix* flag if you intend to install swig in the standard path (*/usr/local*)

`./configure --prefix=$HOME/local/swig-1.3.40`
`make && make install`

-   If you installed SWIG to a nonstandard location add the bin directory to the path by editing your *.profile* file in your home directory. Add the following lines

`# add swig to PATH`
`export PATH=$HOME/local/swig-1.3.40/bin:$PATH`

Instructions for Linux
----------------------

N/A

Instructions for Windows
------------------------

-   Download [SWIG zip](http://prdownloads.sourceforge.net/swig/swigwin-1.3.36.zip)
-   Unzip swigwin-1.3.36.zip into a folder of your choice

### Set CMake paths

-   set environment variables (for MinGW and Visual C++) and add SWIG directory to PATH

`set SWIGDIR=C:\tools\swigwin-1.3.36`
`set PATH=%SWIGDIR%;%PATH%`
`set CMAKE_INCLUDE_PATH=%SWIGDIR%\lib;%CMAKE_INCLUDE_PATH%`

CMake is now able to find SWIG.


The content of this page is available under the [GNU Free Documentation License 1.2](http://www.gnu.org/copyleft/fdl.html).