GNU Automake By Example

Originally published: June 1, 2005

Table of Contents

  1. Abstract
  2. A Minimal Project
  3. Editing Automake-based Projects with KDevelop
  4. Adding Doxygen Support
  5. A More Complex Example
  6. Topics Not Covered
  7. Links


This article presents several simple Automake/Autoconf-based projects. I assume that you know what Automake, Autoconf, and configure are, and that you know how to install a software package from sources (i.e., you know how to invoke "configure & make & make install"). (If you don’t, you can still follow the instructions to create a very small project to play around with.) This article does not contain lengthy explanations or detailed background information. Rather, I present a few examples that (hopefully) get the ideas across.

Some of the topics for which examples are presented:

  • Doxygen support
  • Multiple subdirectories
  • Flex/Bison support
  • Libtool Convenience libraries
  • KDevelop Automake Manager

Continue reading GNU Automake By Example

Building SWIG Python Extensions on GNU/Linux

Originally published: May 27, 2005

Table of Contents

  1. Abstract
  2. Building Manually on the Command Line
  3. Adding SWIG to Autoconf
  4. Adding SWIG to Automake
  5. An Example Project


In the article Python Extensions In C++ Using SWIG, I describe how to extend Python with C++ code. That article also contains instructions for building SWIG extension DLLs on Windows. This article contains instructions for using GNU Automake and Autoconf to build SWIG extensions as shared objects on GNU/Linux.

Continue reading Building SWIG Python Extensions on GNU/Linux

Python Extensions In C++ Using SWIG

Originally published: Oct 8, 2003 (Last update: August 15, 2007)

Table of Contents

  1. Abstract
  2. Introduction
  3. The Python/C API
  4. SWIG Basics
    1. A Quick Example
  5. Building Extensions on GNU/Linux
  6. Building Extensions on Windows
    1. Setting Up The Environment
    2. Enabling Syntax-Highlighting For .i Files
    3. Setting Up The DLL Project
    4. SWIG As A Custom Build Step
    5. Troubleshooting
  7. A Case Study: “pymfg”
    1. Namespaces And Other Reasons Why Your Classes Aren’t Wrapped
    2. Hiding The Unwanted And Faking The Non-Existent
    3. Someone Has Done All The Work – Using STL Classes
    4. The Problem With Pointers To Pointers
  8. Conclusion


This article walks you through the process of writing a Python extension module in C++. To simplify the task, we are going to use SWIG to produce the “glue code” between Python and C++. The article presents the following concepts:

  • Converting between C++ and Python data types
  • Setting up an extension module project that uses SWIG
  • Using SWIG interface definition files
  • Exporting functions and classes
  • Exporting STL containers

Continue reading Python Extensions In C++ Using SWIG

Python and C++, GNU/Linux, computer stuff…