SWIG-4.4.1

#### Beyond Linux® From Scratch (systemd Edition) - Version 13.0

### Chapter 13. Programming

- Prev

  Running a Subversion Server

- Next

  Tk-8.6.17

- Up
- Home

# SWIG-4.4.1

## Introduction to SWIG

SWIG (Simplified Wrapper and Interface Generator) is a compiler that integrates C and C++ with languages including Perl, Python, Tcl, Ruby, PHP, Java, JavaScript, C#, D, Go, Lua, Octave, R, Racket, Scilab, Scheme, and Ocaml. SWIG can also export its parse tree into Lisp s-expressions and XML.

SWIG reads annotated C/C++ header files and creates wrapper code (glue code) in order to make the corresponding C/C++ libraries available to the listed languages, or to extend C/C++ programs with a scripting language.

### Note

This package is known to build and work properly using an LFS 13.0 platform.

### Package Information

- Download (HTTP): https://downloads.sourceforge.net/swig/swig-4.4.1.tar.gz

- Download MD5 sum: 775105851d39ab2fbf093ad743cb1e0a

- Download size: 8.3 MB

- Estimated disk space required: 93 MB (2.5 GB with tests)

- Estimated build time: 0.2 SBU (add up to 50 SBU for tests depending on languages installed; both using parallelism=4)

### SWIG Dependencies

#### Optional

Boost-1.90.0 for tests, and any of the languages mentioned in the introduction, as run-time dependencies

## Installation of SWIG

Install SWIG by running the following commands:

    ./configure --prefix=/usr &&
    make

To test the results, issue: make JSCXX=g++ TCL_INCLUDE= -k check. The unsetting of the variable `TCL_INCLUDE` is necessary since it is not correctly set by configure. The tests are only executed for the languages installed on your machine, so the disk space and SBU values given for the tests may vary, and should be considered as mere orders of magnitude. According to SWIG's documentation, the failure of some tests should not be considered harmful. The go tests are buggy and may generate a lot of meaningless output. 8 of the tests in the JavaScript suite are known to fail.

Now, as the `root` user:

    make install &&
    cp -v -R Doc -T /usr/share/doc/swig-4.4.1

## Command Explanations

`--without-<language>`: allows disabling the building of tests and examples for <language>, but all the languages capabilities of SWIG are always built.

## Contents

Installed Programs: swig and ccache-swig
Installed Library: None
Installed Directories: /usr/share/doc/swig-4.4.1 and /usr/share/swig

### Short Descriptions

swig | takes an interface file containing C/C++ declarations and SWIG special instructions, and generates the corresponding wrapper code needed to build extension modules
ccache-swig | is a compiler cache, which speeds up re-compilation of C/C++/SWIG code

- Prev

  Running a Subversion Server

- Next

  Tk-8.6.17

- Up
- Home