Home>Projects>Documentation>Writing modules in C

-

cmod downloads

Template code

Here is a simple template which may be used to write your own CMODs. Please note that this code will not compile out-of-the-box. It is meant as a template which shows where code needs to be modified. Please examine all files carefully.
To use, simply unpack the archive in your src/modules dir and recompile Pike.

Examples

Here are some examples that do compile out-of-the-box.
Hello World example written in CMOD.
To use, simply unpack the archive in your src/modules dir and recompile Pike.

Tutorial PDFs

A more thorough documentation of the CMOD documentation is available in the Master's thesis "A Case Study for Developing a C Based Module in Pike", which covers most of the C and CMOD interfaces. Its tutorial appendix is also available as a separate document, and an on-line HTML version. Fetch cmod-thesis.tar.bz2 for the full TeX source, some test cases and additional material.

We also present a thesis work on the design framework (and implementation of) new ADTs in Pike. It documents the APIs used by the new (to 7.5) ADT.CircularList and ADT.Sequence classes, as well as drawing the map for additional Pike ADTs developed in the future and their iterators.