1. Home
  2. Computing & Technology
  3. C / C++ / C#

A Library of Software written in C with full source code.

The C library holds full source code from example articles, reader submitted code and any code that is in the public domain. See also
C++ Code Library
C# Code Library
Agar - Open-Source Cross-Platform Toolkit
Agar is an open-source, cross-platform toolkit for creating graphical applications. The GUI uses hardware graphics acceleration when available, but also supports plain framebuffer interfaces such as direct video via SDL. When a window system is not available, Agar can even provide its own.
AMD's Open Source Framewave Library
Derived from the AMD Performance Library, Framewave is a free and open-source collection of image and signal processing routines to accelerate application development, debugging, and optimization on x86-class processor platforms. It's API compatible with the Intel® Integrated Performance Primitives (Intel® IPP), now supports Mac OS support and has MPEG1 and MPEG2 Decode support.
Amaya - Open Source Browser/Editor
Amaya, a W3.org open source project started as an HTML + CSS style sheets editor and now supports XML and the XHTML family, MathML, and SVG.
An Embeddable Web Server
SHTTPD is tiny, easy to use web server for Windows and UNIX. Ideal for web developers, web-based software demos (like PHP, Perl etc), quick file sharing, personal use. It also can be used as a library that provides web server functionality, to create web interface for C/C++ applications. SHTTPD is licensed under the terms of beerware license.
Apollo Guidance Computer Simulator
This project provides an emulation of the on-board Apollo guidance computers plus some ancillary items needed to make the emulation do something interesting. "AGC" stands for Apollo Guidance Computer. The AGC was the principal on-board computer for NASA's Apollo missions, including all of the lunar landings.
Cairo Graphics - 2D Graphic Rendering on Multiple Devices
Cairo is a 2D graphics library that outputs for multiple devices including the X Window System, Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL (through glitz), XCB, BeOS, OS/2, and DirectFB. Cairo is designed to produce consistent output on all output media and using display hardware acceleration when available.
CBM 64 Basic Interpreter for Mac, Linux and Windows
A CBM-64 Basic Interpreter created from the Commodore CBM-64 Basic Interpreter. It runs about 1000 x faster than the original.
Chipmunk 2D Physics Engine
Chipmunk is a fast 2D Game library designed for 2D video games. It includes circle, convex polygon, and line segment collision primitives and multiple collision primitives can be attached to the same rigid body. Fast collision detection by using a spatial hash for the broad phase with collision callbacks. It's licensed under the liberal MIT license.
cURL - A Library for Internet File Transfers
libcurl is a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer resume, http proxy tunneling and more!
Dirac - An Open Source Codec from the BBC
Dirac is an advanced royalty-free video compression format designed for a wide range of uses, from delivering low-resolution web content to broadcasting HD and beyond, to near-lossless studio editing.
Anonynimity Online - the TOR Project
Tor is a software project that helps defend you against network surveillance. It protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, and prevents the visited sites from learning your physical location.
Asterisk - Open Source PBX Software
Asterisk is the world's leading open source PBX, telephony engine, and telephony applications toolkit. It offers flexibility unheard of in the world of proprietary communications and Asterisk lets developers and integrators create advanced communication solutions ...for free.
Canon Hackers Development Kit
The Open Source Canon Hackers Development Kit provides additional (albeit unofficial) functionality to owners of several Canon Digital cameras. The wiki has over 250 pages about the kit.
CMockery - a lightweight library for Unit Testing
Cmockery is a relatively small library produced by Google that can be used to test a variety of exotic code.
Crypto1 Cipher Plus Attack on a Mifare Classic Chip
This provides an implementation of the crypto1 cipher, as well as an implementation of the attack specified by the folks in Nijmegen in http://www.sos.cs.ru.nl/applications/rfid/2008-esorics.pdf
CMPH - C Minimal Perfect Hashing Library
The CMPH Library is cross platform (Linux and Windows) and includes the newest and more efficient algorithms in an easy-to-use, production-quality, fast API. It has been designed to work with big entries that cannot fit in main memory and used successfully for constructing minimal perfect hash functions for sets with more than 100 million of keys.
Cyclone - Safe C Compiler
Cyclone is a safe dialect of C with pointers and pointer arithmetic, structs, arrays, goto, manual memory management, and C’s preprocessor and syntax. However Cyclone adds features such as pattern matching, algebraic datatypes, exceptions, region-based memory management, and optional garbage collection.
Dmalloc - Debug Memory Replacement for malloc
The debug memory allocation or dmalloc library has been designed as a drop in replacement for malloc, realloc, calloc, free and other memory management routines. It provides powerful and portable debugging facilities,including memory-leak tracking, fence-post write detection, file/line number reporting, and general logging of statistics.
Doxygen - A Document Generator for C, C+= and C#
Doxygen is a source code documentation generator for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D.
FANN - Fast Artificial Neural Network
FANN is a Fast Artificial Neural Network Library in C that includes Back propagation training (RPROP, Quickprop, Batch, Incremental), vvolving topology training which dynamically builds and trains the ANN (Cascade2). It's easy to use (create, train and run an ANN with just three function calls), and is fast, up to 150 times faster execution than other libraries.
Fontforge - Application for Creating/Editing Fonts.
I think this is the only open source font editor that lets you create your own postscript, truetype, opentype, cid-keyed, multi-master, cff, svg and bitmap (bdf, FON, NFNT) fonts, or edit existing ones. It Also lets you convert one format to another. FontForge has support for many macintosh font formats. It's Linux mainly but also cross platform using Cygwin on Windows.
Frama-C Static Analyzer for C Code
Frama-C is an extensible platform dedicated to source-code analysis of C software licensed under GPL 2. It's also cross-platform so can be built for windows or Unix/Linux and a Mac binary is promised. It's funded by the European Commission.
Gdb - GNU Debugger
This is the GNU command line debugger. It can debug (local or remotely) programs written in Ada, C, C++, Objective-C, Pascal (and many other languages). GDB can run on most popular UNIX and Microsoft Windows variants.
Go - Google'e Systems Programming Language
Go is simple, type and and memory safe and fast with compilers producing fast code fast. Builds take a fraction of a second yet the resulting programs run nearly as quickly as comparable C or C++ code. Go is Go has fast builds, clean syntax, garbage collection, methods for any type, and run-time reflection.
Google's RatProxy - A non-Intrusive Website Vulnerability Detector
This is a semi-automated, largely passive web application security audit tool for Web 2.0 websites. It looks for potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments.
GnuPG - Email Privacy Guard Source Code
GnuPG is the GNU project's complete and free implementation of the OpenPGP standard. It lets you encrypt and sign your data and communication, has a versatile key managment system as well plus modules for all kind of public key directories. GnuPG, also known as GPG, is a command line tool with features for easy integration with other applications.
GNU SQL Server - Free SQL Database
SQL Server is a free portable multiuser relational database management system. It supports the full SQL89 dialect and has some extensions from SQL92. It provides multiuser access and transaction isolation based on predicative locks. The working OS: UNIX. The working language: C . It also uses RPC, shared memory and message queues. This is ten years old so probably begging to be worked on!
GRASS GIS - Open Source Geographic Information System (GIS)
GRASS is Geographic Resources Analysis Support System, a GIS used for geospatial data management, analysis, image processing, graphics/maps production and visualization. Written in ANSI-C, it's cross-platform and runs on GNU/Linux, Mac OS X, Microsoft Windows (native using MinGW or via Cygwin), Sun Solaris (SPARC/Intel) and a wide variety of UNIX compliant platforms.
GTK For Mac OS-X
GTK+ is a cross-platform toolkit for application development. It's written in the C language. Licensed under the GNU LGPL, it allows you to write both free and proprietary applications without any license fee. This site provides packages for the Mac OS X.
Microsoft Excel Software Development Kit
The Microsoft Office Excel XLL Software Development Kit (SDK) contains conceptual overviews, programming tasks, and sample projects to guide you in developing Excel 2007 XLLs. These are DLLS (Dynamic Link Libraries) of code written in C or C++ that provide additional high speed functionality.
Lame- Open Source MP3 Software
LAME is an educational tool to be used for learning about MP3 encoding. The goal of the LAME project is to use the open source model to improve the psycho acoustics, noise shaping and speed of MP3. LAME is distributed as source code only.
Libface - Open Source Face Recognition library
Libface is a library for face recognition built upon Intel's OpenCV Library. It has got a complete collection of functions that are essential for building a face recognition system.
Lua - A Scripting Language
Lua is a lightweight programming language, designed as a scripting language with extensible semantics as a primary goal. It has enjoyed great popularity in the videogame industry and is known for having a simple yet powerful C API. It's 17,000 lines of Ansi C code.
LZMA Compression SDK
LZMA SDK provides the documentation, samples, header files, libraries, and tools needed to develop applications that use the LZMA compression algorithm.
Mersenne twister -a Random Number Generator
A Mersenne twister is a very fast pseudorandom number generator of period 2^19937-1 developed by Makoto Matsumoto and Takuji Nishimura in 1996/1997.
OpenCL Language Header Files
The OpenCL API registry contains specifications of the core API; specifications of Khronos- and vendor-approved OpenCL extensions; header files corresponding to the specifications; and other related documentation. OpenCL (open Computer language) is a specification to allow parallel processing on a diverse range of computing devices.
OpenCV - open Source Computer Vision Library
OpenCV is a library of functions for real time computer vision. It includes code for Human-Computer Interaction (HCI); Object Identification, Segmentation and Recognition; Face Recognition; Gesture Recognition; Camera and Motion Tracking, Ego Motion, Motion Understanding; Structure From Motion; Stereo and Multi-Camera Calibration and Depth Computation and Mobile Robotics.
Open Source Graphics Library for the Dynamic Creation of Images
The open source GD library creates PNG, JPEG and GIF images, among other formats and is commonly used to generate charts, graphics, thumbnails, and most anything else.
Open Source Software for Origami Design
Robert Lang has developed Treemaker, an Open Source application for designing very complex Origami models.
Open Source SSL Library
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library.
OpenVPN- Open Source Secure Networking
OpenVPN is an open source SSL VPN that accommodates a wide range of configurations, including remote access, site-to-site VPNs, Wi-Fi security, and remote access solutions with load balancing, failover, and access controls.
Pike - A Free Interpreted C/C# like Programming Language
Pike is a dynamic programming language with a syntax similar to C# and C. It's simple to learn, is interpreted and doesn't need long compilation passes and has powerful built-in data types allowing simple and really fast data manipulation.
Porter Stemming Algorithm
A stemming algorithm removes the ends of words to reveal the original root of the word. For instance "fishing", "fished", "fish", and "fisher" are all based on "fish". The Porter Stemming Algorithm is a popular and free to use algorithm with implementations in many languages including C and C#.
PostgresSQL - Enterprise Quality Open Source SQL Database
PostgreSQL is an open source relational database under development for over 15 years. It is renowned for reliability, data integrity, and correctness and runs on Linux, UNIX and Windows. Fully ACID compliant, it has full support for foreign keys, joins, views, triggers, and stored procedures and apis for C/C++, .Net (+ others) and has exceptional documentation.
Protothreads - A lightwight stackless thread library
Protothreads are lightweight stackless threads that can be used in memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads can be used with or without an underlying operating system to provide blocking event-handlers and provide sequential flow of control without complex state machines or full multi-threading.
PuTTY - A Free Telnet/SSH Client
PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an xterm terminal emulator. It supports both SSH-1 and SSH-2 and includes SFTP/SCP support.
Puzzle Collection for Unix, Mac (OS X) and Windows
A collection of small computer programs written in C which implement one-player puzzle games. All of them run natively on Unix (GTK), on Windows, and on Mac OS X.
QEMU Open Source Machine Emulator and Virtualizer
QEMU is an open source machine emulator and virtualizer. When used as a machine emulator, QEMU can run Operating Systems and programs made for one machine (e.g. an ARM board) on a different machine (e.g. a PC) using dynamic translation, to achieve very good performance. As a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU.
Quhelp - Generate help fiiles
QuHelp is a program that generates a help site with tree navigator and other nice stuff using a template and a content directory of html files.
Reactos - a Free/Open Source Windows Compatible OS
ReactOS® is a free/operating system based on the design of Windows® XP/2003. Written completely from scratch, it aims to follow the Microsoft Windows® architecture from the hardware level right through to the application level. The main goal of the ReactOS project is to provide an operating system which is binary compatible with Windows.
Safe C Library - Alternative safe Functions
Provided by Cisco Systems, the Safe C library helps guard against buffer overflows, does not produce unterminated strings or unexpectedly truncate strings and supports compile time checking. Itincludes html help files though they're not very well indexed or linked.
Shine - Simple MP3 Encoding
Developed by one of the LAME developers, Shine is a a very simple MP3 encoder- a good starting point before moving onto Lame.
Secure Programming Lint Utility for Programs written in C
Splint is a tool for statically checking C programs for security vulnerabilities and coding mistakes. Splint can be used as a better lint. If additional effort is invested adding annotations to programs, Splint can perform stronger checking than can be done by any standard lint.
Smaz - Short String Compression library
Smaz is a library for compressing and decompressing short strings, written by Salvatore Sanfilippo and BSD licensed. It's only intended to be used for short strings not general strings.
SQLite - A Free Embedded SQL Database
SQLite is a software library that implements a self-contained, embedded (ie no server), zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.
Suffix Array Code for a Fast Searchi of 200 million digits
This is the code from the website Pi Search that searches the first 200 million digits of PI (after the decimal point). You will also need to download the digits data from that site.
The Standard Function Library
The SFL (Standard Function Library) is an open source portable function library for C/C++ programs. The SFL provides about 450 functions for compression, encryption, encoding, datatype conversion and formatting, dates, times, calendars, internet programming (MIME, CGI) [/ul] and many more.
Test the randomess of a stream of numbers
This is the source code for Ent, an application which measures the entropy of a series of numbers and applies the Chi Square statistical test for randomness.
TightVNC - Free Remote Access Software for Linux and Windows
TightVNC is free remote control software package derived from the popular VNC software. With TightVNC, you see the desktop of a remote machine and control it with your local mouse and keyboard, as if you sitting in the front of that computer. TightVNC is free, GPL-licensed, with full source code available.
The Better C and C++ Open Source String Library
The Better String Library is superior to the C library char string type, or C++'s std::string. It's safer with regard to buffer overflows, simpler than C string manipulation, works ok for '\0' terminated strings and generally faster for common string operations. It works with gcc/g++, MSVC++, Intel C++, WATCOM C/C++, Turbo C, Borland C++, IBM's native CC compiler on Windows, Linux and Mac OS X.
Theora 1.0 - Open Source Video Codec
Theora is an open and royalty-free lossy video compression technology developed by the Xiph.Org Foundation as part of their Ogg project. Based upon On2 Technologies' VP3 codec, Theora competes with MPEG-4, WMV, and similar low-bitrate video compression schemes and is regarded as being safe from patent trolls.
Tiny C Compiler For Linux (Windows Version Included)
Tinycc is a small, simple, and fast fully functional single-pass C compiler supporting C99 and several gcc extensions, plus full debug info (-g) and an optional memory and bounds checker. Source code to allow it to compile under Windows is also included.
Truecrypt a File and Disk Encryption Utility for Windows/Linux
Truecrypt is an Open Source utility written in C that allows you to encrypt files or disk volumes on Windows or Linux and is very secure.
Wordnet - A lexical database of English with C interface
WordNet® is a large lexical database of English with a C API useful for computational linguistics and natural language processing. Nouns, verbs, adjectives and adverbs are grouped into synsets, each expressing a distinct concept. Synsets are interlinked so meaningfully related words and concepts can be browsed. WordNet is free for commercial/non-commercial use.
Ubiqx - Open Source GPL Data Structure Library
Ubiqx is a collection of ANSI C compatible modules for implementing linked lists, binary trees, caching and spare arrays.
ZLib - Free Compression Library
zlib is a free, general-purpose, not covered by any patents, lossless data-compression library for use on virtually any computer hardware and operating system.
Explore C / C++ / C#
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. C / C++ / C#
  4. Code Library
  5. Code Library for C

©2009 About.com, a part of The New York Times Company.

All rights reserved.