Free C / C++ Libraries, Source Code and Frameworks

Reusable source code, libraries, components to link with your programs


Free C / C++ Libraries, Source Code and Frameworks

Here are some C and C++ libraries, DLLs, VCLs, source code, components, modules, application frameworks, class libraries, source code snippets, and the like, that you can use with your programs without payment of fees and royalties. Note that some libraries (etc) listed here may have certain restrictions about its use and/or distribution. Be sure you read the licence conditions in each package before using them.

A few types of libraries have been moved to their own pages, due to the large number of items in those categories. Here are some of the other pages containing free libraries on this site:

Free Edit Controls, Libraries and Source Code

Note: if you are looking for WYSIWYG web editors that you can embed into your web page, you should check the Free Online Web-Based WYSIWYG HTML Editor JavaScripts page instead.

SynEdit Multi-line Edit Control

SynEdit is a multi-line edit control that you can use in your Delphi and Borland C++ Builder programs. Features include syntax highlighting for a variety of programming languages and a macro recorder. This is a VCL control that comes with source code.

Scintilla Edit Control

Ever wanted to create your own syntax-highlighting editor? Scintilla is a source code edit control, similar in concept to Microsoft's RichEdit control, that supports things like syntax highlighting, code completion and call tips. It also supports things like the use of proportional fonts, bold, italics, multiple foreground and background colours, and multiple fonts. The source code is available free, and the licence allows you to use the control in any project, free or commercial. You may also want to check out the Free Spell Checker Libraries, Source Code, Controls, Components to avoid reinventing the wheel.

Free C/C++ Font Libraries

FreeType

Heard of True Type? Well, now you can include True Type support in your programs on systems that do not have True Type support by default. Linux and other OSes are supported.

T1Lib - Adobe Type 1 Fonts Library

[Update: the original site for this library at ftp://sunsite.unc.edu/pub/Linux/libs/graphics/ appears to be gone. You may be able to get the source from the Windows port of t1lib.] If you want your applications to support Adobe Type 1 fonts, this rasterizing library might be just what you need. It requires a Unix system. It is implemented independently of X11, so it might be the solution for those of you who don't want to use the Type 1 rasterizer provided with X11R5 and later. To get the source code, look for a file with a name like t1lib-*.tar.gz (where * is replaced by the version number).

Free Standard Template Libraries (C++ STL Libraries)

STLport (STL Library)

This version of STL (Standard Template Library for C++) is available free of charge from their website. It is apparently also shipped with the current versions of the Borland / Turbo C++ compilers.

STLSoft

STLSoft is a collection of templates in header form that contain numerous classes and functions for Windows and Unix systems. Included in this library are ATLSTL (for creating COM components with the Active Template Library), COMSTL (allows the manipulation of the Component Object Model interfaces and API), .netSTL (applies STL techniques to the .NET framework), InetSTL (applies the STL techniques to the Internet APIs), MFCSTL (allows the manipulation of the Microsoft Foundation Classes or MFC), UNIXSTL (library for programming Unix-type systems), and WinSTL (allows you to program using the Windows API). The library comes with documentation and works with numerous compilers including Borland C++, Comeau C/C++, Digital Mars C/C++, GNU gcc, Intel C/C++, Metrowerks Codewarrior, Microsoft Visual C++, and OpenWatcom. As of version 1.8.1, STLSoft is licensed under the BSD license.

SGI Standard Template Library (STL)

[Update: the SGI Tech Archives are no longer available.] If your compiler does not have a recent Standard Template Library implementation, you might want to consider this version available free from SGI.

Free C/C++ Thread Libraries

FSU Pthreads (POSIX Threads)

This C library implements POSIX threads on a variety of operating systems, including Linux, FreeBSD, SCO Unix, Solaris, SunOS and DOS.

QpThread

(Since the original QpThread does not appear to be available any more, I'm listing this fork of QpThread.) The QpThread is a C++ framework for threads and Unix signals that operates on top of POSIX threads. It supports deferred cancellation (through C++ exceptions), timers, thread pools, etc.

Threading Building Blocks

The Threading Building Blocks, or TBB, is a C++ threading library that abstracts platform details and threading mechanisms for your multi-threaded programs. Since it abstracts many details of thread management, it helps to reduce application complexity. The task manager handles load balancing among the processors, after automatically choosing the optimal number of processes for the system. The library is released under the Apache 2.0 licence. Supported systems include Linux, Windows and Mac OS X.

LinuxThreads Library

[Update: this library is no longer available.] The LinuxThreads library implements Posix 1003.1c threads on (as the name reveals) Linux. It provides kernel-level threads where scheduling is handled by the Linux kernel. Thus, unlike user-level thread packages, it can take advantage of multiprocessors.

Free Operating System Development Libraries

OSLib

OSLib is a C library for programmers writing system software (whether it be embedded software or even entire operating system kernels). It comprises 4 libraries (the extender library, the standard C library, the math library and the kernel library).

MIT Exokernel Operating System

The MIT Exokernel Operating System attempts to provide a level of abstraction of hardware so that you can concentrate on the other aspects of implementing an operating system. It may be useful to those of you planning to write an operating system.

The OSKit Project (Flux)

The OSKit Project is a C framework of 34 components providing a wide variety of facilities that is useful for people planning to write operating system kernels, servers, boot loaders, embedded applications and the like. The function libraries provide numerous facilities, including some common C library services (string, memory, printf, etc), default handlers for traps and interrupts, kernel support functions such as those that set up and manipulate page tables (etc), support for multiprocessor systems, POSIX emulation system call libraries, memory management, threads, synchronization, scheduling, debugging aids, hard disk handling, file system implementations, device driver implementations (SCSI, IDE, network drivers), video driver implementations, etc. The portions of OSKit that contain machine-dependent code currently supports Intel x86 and Digital DNARD (StrongArm SA-110 CPU).

Other Free C/C++ Libraries

GLib New

GLib is a portable C library that implements utility functions for linked lists, hash tables, dynamic strings, dynamic arrays, balanced binary trees, keyed data lists, tuples, caches, threads, mutexes, asynchronous queues, secure memory pools, message passing, timers, byte order conversion, character set conversion, Unicode manipulation, internationalization, Base64 encoding/decoding, a general purpose lexical scanner, glob-style pattern matching, XML parsing, test framework, etc. Although it is part of the GNOME project, it is written to be independent of GTK and thus can be used by other software unrelated to GNOME. It works on Linux, macOS, Windows and Unix-like systems. At the time I write this, the project page listed above does not have a direct link to the download location, so if you can't find it (or don't want to waste your time looking), go directly to this location. It is licensed under the GNU Lesser General Public License.

OpenCV: Open Source Computer Vision

OpenCV, or Open Source Computer Vision, is a library with functions for real time computer vision. It can be used in programs written in C, C++ and Python running on Windows, Linux, Mac OS X and Android. It has functions dealing with image processing, image transformations, detection and recognition, motion analysis and object tracking, segmentation, camera calibration and 3D reconstruction, matrix mathematics, histograms, drawing functions, etc. The library is licensed under the BSD licence.

UpTools C++ Library

The UpTools C++ Library, from the Universidad De Palermo (ie, University of Palermo), is an open source C++ library with facilities for load distribution and parallel processing, multi-threading, timers, memory management (with smart pointers for objects in multithreaded environments), regular expressions, common interfaces for different databases, database access in a multithreaded environment, networking support (DNS, SSL, TLS, sockets, etc), and so on. The library appears to be written for Linux.

Boost C++ Libraries

This site is a source of "free peer-reviewed portable C++ source libraries" (quoted from the site). There are numerous libraries available, including libraries for managing date and time, filesystems, iterators, random numbers, regex, tests, strings, text processing, containers, math and numerics, data structures, memory, parsing, concurrent programming, algorithms, etc.

libunicows

libunicows allows you to write programs that use Unicode on Windows 9x/ME with a compiler other than Microsoft Visual C++ (the Microsoft unicows library requires Visual C++). This library supports (at the time I write this) MinGW, Visual C++ 6, Borland C++, and the Watcom (and OpenWatcom) C/C++ compiler. It comes with source code released under the MIT licence.

Robust glob with smarter char class handling

Robust glob is a parser to handle wildcards (similar to the way that Unix shells parse wildcards). It is released into the public domain (or so the site says). It is useful if you want to write a program with globbing facility but don't want to use the GPL ones that come from the Free Software Foundation. (The package is somewhere in the middle of the page linked to, in the section with the title "public source", or at least it was at the time this entry was written; just scroll down to find it.)

libsigc++ Callback Framework for C++

libsigc++ has C++ classes that provide you a typesafe callback system. You can define signals and assign callback functions to those signals. It is licensed under the GNU Library General Public License (LGPL). It works on platforms with a standards-compliant C++ compiler, such as those with gcc (see the Free C/C++ Compilers page for gcc). A port for Microsoft Visual C++ (which does not implement partial specializating) has also been integrated into the distribution, so the library should also work with that compiler.

The Standard Function Library

The Standard Function Library, or SFL, contains routines for compression, encryption, encoding, data type conversion, data output formatting, process control, dates, times, calendars, symbol tables, linked lists, configuration files, error message files, string manipulation, searching, Internet socket access, MIME, CGI, SMTP, batch programming, debug tracing, directory access, environment access, etc. It is designed with portability in mind. The library is written in ANSI C and is supported on MSDOS, Windows, OS/2, Linux, AIX, SunOS, HP/UX, Solaris, NetBSD, FreeBSD, SCO OpenServer, Digital Unix, and OpenVMS. The source code is also available.

libtidy

Libtidy is the underlying HTML validation library on which the console application HTML Tidy is linked against. This C library lets you embed HTML validation facilities into your application, which may come in handy if you are writing your own editor. Note: if you have difficulty finding things on their site, here are some links: the repository for the library, the releases page from which you can download the sources in zip or tar.gz form, and the documentation for libtidy.

GNU Lightning

GNU Lightning is a library of routines that allows programs to generate assembly language code at runtime. It abstracts the target CPU, exposing your program to a standardized RISC instruction set. The library is supposed to be fast, thus making it useful if you're developing a Just-In-Time compiler.

TurboPower Async Professional

If you need to add speech to your programs, or enable it to process speech input, TurboPower's Async Professional provides you an easy access to Microsoft's Speech API (SAPI) allowing you to integrate voice/speech recognition and speech synthesis in your programs. It also handles the sending and receiving (as well as viewing and printing) of faxes (and converts BMP, DCX, PCX and TIF files automatically), alphanumeric and text (GSM/SMS) paging, high speed file transfers (including the major file transfer protocols like Zmodem and FTP), IP telephony (audio and video, Voice Over IP or VOIP), Internet communications (Winsock access), supports ISDN modems, RS-232 and RS-485 standards, and includes an XML-based modem database. And so on. Like most of the TurboPower tools, this open source toolkit may be used with Delphi and Borland C++ Builder and ActiveX environments like Microsoft Visual C++ and Visual Basic. If you use Borland Kylix on Linux, a Pascal and Delphi-like compiler, you might want to try the TurboPower Async Professional CLX version.

TurboPower SysTools

TurboPower SysTools contain numerous utility functions and classes for Borland Delphi and Borland C++ Builder as well as programming environments that support COM objects (like Microsoft Visual Basic, Microsoft Visual C++. Among the routines included in this library are string manipulation routines, date and time math routines, high-speed sorting, high-precision maths, runtime math expression analyzer, Microsoft Excel-like finance and statistical routines, email attachment MIME encoding and decoding, reusable containers (stacks, queues, trees, deques, hash tables), CRC data integrity checking, 1 dimensional and 2 dimensional (1-D and 2-D) bar codes, money routines, logging classes, patterns, random number distributions, text data manipulation and more. SysTools is open source, released by TurboPower under the Mozilla Public License. It works on Windows systems. There is also a version of TurboPower SysTools for Kylix.

TurboPower Orpheus

TurboPower Orpheus contains over 120 VCL components such as data entry components, data entry validators, grid for presenting and editing 2 column information, status bars, progress bars, button and tab styles, reports, countdown and elapsed timer components, etc. Orpheus is open source, and may be used with development tools that support VCL such as Borland Delphi and C++Builder.

TurboPower ShellShock

ShellShock contains native VCL components that allow your application to integrate with the Windows shell and Windows explorer. Included in this package are tree views, list views, combo boxes, enumeration of folder contents, monitoring of shell events, file operations (copy, delete, move, rename, together with Windows shell animations), drag and drop support, Windows shortcut creation and inspection, customization of common dialog boxes, minimization to the system tray, etc. You need to use a development tool that supports VCL such as Borland C++Builder and Delphi to use this toolkit. ShellShock comes with source code.

TurboPower OnGuard

If you need to create demo versions of your programs, you might want to check out TurboPower's OnGuard library. The library provides you the ability to create applications that are time-limited, feature-limited, limited to a certain number of uses, limited to a certain number of concurrent network users, etc. Written in Object Pascal, it may be used in Windows development using tools like Borland C++Builder or Delphi.

TurboPower Essentials

TurboPower Essentials has 13 open source native VCL components that provides drop-down calendars and calculators, roll-up dialog boxes, 3-D labels, tiled backgrounds, scrolling messages, menu buttons, etc. You need to use a development tool that supports VCL such as Borland C++Builder and Delphi to use this toolkit.

TurboPower Visual PlanIt

Add time, task and contact management to your applications with Visual PlanIt's synchronized data-aware VCL components. You can create mult-column Outlook style contact grids; day, week, month event views, Outlook style task lists, connect-and-go database connectivity, printing, etc. The components are compatible with Delphi and C++Builder (and presumably any other development system that supports VCL components).

GetPot

GetPot, an anagram of the ubiquitous getopt, allows programs to parse command lines and simple input files by simply including the header file for the library (the entire library is apparently in the header file). C++, Java, Ruby and Python versions are currently available. The library is distributed under the GNU LGPL.

MyLibC

MyLibC is a clone of glibc for Windows. The author wrote this to reduce the size of executables that resulted when glib was used on Windows. Sources are provided.

uClibc - C Library for Embedded Systems

uClibc is a C library for developing embedded Linux systems. It supports shared libraries, multithreading and runs on standard Linux systems with support for ARM, i386, h8300, m68k, mips, mipsel, PowerPC, SH, SPARC, and v850 processors.

Matrix TCL Pro

Matrix TCL Pro is a C++ matrix template class that may be used for common matrix operations like any other built-in data types. The site says that it can be used for any modern ANSI/ISO C++ compliant compiler.

LibSMI

This C library "allows network management applications to access SMI MIB module information through a well defined API that hides the nasty details of locating and parsing SMIv1/v2 MIB modules."

Whisper2 C++ Application Framework

Whisper2 is a general purpose C++ application framework, which takes advantage of templates, multiple inheritance, STL and exceptions. It is portable to both Macintosh and Win32. It contains numerous debugging tools.

OmniORB

This is a CORBA 2 ORB (with associated libraries) that was originally developed by AT&T Laboratories, Cambridge, and is certified CORBA 2.1 compliant. OmniORB is distributed under the GNU GPL and the libraries in the package is distributed under the Library GPL. The package is designed in such a way so that you can actually distribute your applications that use the libraries without being forced to release your source code as well. Platforms supported include Solaris, Windows NT, Windows 95, Linux (x86, PowerPC), Digital Unix, AIX, HPUX, Open VMS (Alpha and Vax), NextStep, Reliant Unix, Phar Lap's Real Time ETS Kernel, SGI Irix, SCO Unixware, MacOS, OS RTEMS, SCO OpenServer, etc. In case you are wondering what CORBA is, it basically defines the interface and API that allows programs to communicate with each other even if they are running on separate machines on different hardware and operating systems.

GNU Common C++

GNU Common C++ is a C++ framework for developing portable threaded applications. It has abstractions for threads, sockets, XML parsing, serialization, config files, and so on, hiding the differences between platforms in its classes so that you can write code that is (hopefully) portable. It is released under the GNU GPL license.

Hoard malloc/free Replacement

Hoard is a malloc/free replacement that is supposed to be fast, scalable and memory efficient. It supports Linux and other Unix platforms. It is licensed under the GNU General Public License.

Boehm-Demers-Weiser Garbage Collector

A garbage collector for C/C++ that can also function as a memory leak detector. You can simply replace your calls to malloc() with GC_malloc(). Win32, Win32s, OS/2, MacOS, AmigaDOS and Unix systems are supported.

GradC++ ToolBox

[Update: this library does not seem to be available any more.] GradC++ ToolBox contains several C++ components dealing with threading, program options, logging, and initialisation of COBRA services. It comes with an administrative guide, programmers' guide and sources. I think the C++ library may be used free of charge for non-commercial purposes, but I'm not sure. It's best to read the licence yourself.

IO95: Win95 LFN API Wrapper Library

[Update: this library does not seem to be available any more.] This library has functions which you can call from your MSDOS programs to access the long filenames (LFN) API found in Windows 95 and above. It thus makes it easy for you to write long file name (LFN) support. The library contains the POSIX.1 compatible opendir() functions, DOS findfirst() functions, open() functions, fopen() functions, mk/rm/chdir(), remove(), unlink(), rename(), getcwd(), getdcwd(), getcurdir(), fullpath(), lfn2sfn(). As you can see, all the hard work of accessing the API has been done for you - just use the usual familiar functions (whether Unix or DOS). It requires a Borland compiler to compile (which you can get it for free, legally - check out the Free C/C++ Compilers page).

Related Pages

Newest Pages

How to Link to This Page

It will appear on your page as:

Free C / C++ Libraries, Source Code and Frameworks

 


 

thesitewizard.com: Free Webmaster Tutorials, Scripts and Articles

HowtoHaven.com: Free How-To Guides

thefreecountry.com: Free Programmers, Webmasters and Security Resources
If you find this site useful, please link to us.