Skip to content
DataReel Software Development
  1. Home
  2. DataReel C/C++ API
C++ API

DataReel C/C++ API

A comprehensive cross-platform C++ development kit used to build high performance multi-threaded database and communication applications on Linux and Windows.

Contents

Overview
Features
License
Supported Platforms
Supported Compilers
Package Map
Example Programs
Code Review and Fixes
Linux Builds
Windows Builds
Setup For Windows 11 desktop or Windows server 2025 development system

Overview

What is DataReel?
Datareel is a comprehensive cross-platform C++ development kit used to build multi-threaded database and communication applications. C++ is a programming language that produces fast executing compiled programs and offers very powerful programming capabilities. Unlike interpreted languages such as JAVA and PERL the C++ language by itself does not contain built-in programming interfaces for database, communications, and multi-threaded programming. By using DataReel you can extend the power of the C++ programming language by using high-level programming interfaces for database, communications, and multi-threaded programming.

The DataReel development package was produced by independent work and contract work released to the public through non-exclusive license agreements. The initial work began independently in 1997 and was augmented from 1999 to 2004 by code produced under contract to support various applications. Several developers throughout the World have made contributions to enhance the DataReel code and promote its stability. In 2005 the DataReel code library underwent intense analysis to produce a bulletproof code base suitable for use in complex commercial applications.

Why Use DataReel?
DataReel simplifies complex time consuming database, socket, and multi-threaded programming tasks by providing JAVA like programming interfaces for database, communications, and multi-threaded programming. Using DataReel you can harness the full power of the C++ programming language and build stable end-user applications, embedded systems, and reusable libraries for multiple operating systems.

DataReel is flexible. Using DataReel gives your developers the flexibility to develop core application components independently of complex user interfaces. DataReel is portable. DataReel not only offers portability but also interoperability between multiple platforms. DataReel is modular. DataReel is a modular approach to network and database programming making code adaptation and cross-platform testing easy.

Who Can Use DataReel?
The DataReel toolkit is available to commercial, individual, and academic developers. The DataReel code base is distributed to the public in an open source format. This keeps the code stable through the continued support of worldwide developers who submit code enhancements and report potential problems. The open source format is also intended to promote the C++ programming language as the language of choice for any programming task.

Who Can Contribute?
The DataReel project accepts bug fixes, enhancements, and additions from all developers. Project git repo:

https://github.com/datareel/datareel.

Features

Database

  • WIN32/UNIX Interoperability
  • 32-Bit DB Engine
  • 64-Bit DB Engine
  • Large file support
  • CRC Checking
  • Portable File Locking
  • Portable Record Locking
  • B-tree Indexing
  • Persistent Objects
  • Supports OODM Design
  • Supports RDBMS Design
  • Supports Multi-threading
  • Supports Client/Server Apps
  • Built-in Network Database
  • Real-time TCP Streaming
  • Real-time UDP Streaming
  • RS232 streaming

Sockets

  • WIN32/UNIX Interoperability
  • Winsock/BSD Wrappers
  • Object-Oriented Design
  • Stream Sockets
  • Datagram Sockets
  • RS232 Support
  • Supports Multi-threading
  • Embedded Ping
  • Embedded FTP
  • Embedded Telnet
  • Embedded SMTP
  • Embedded POP3
  • Embedded HTTP
  • URL Parsing
  • HTML Parsing
  • HTML Generator
  • Embedded SSL
  • XML Parsing

Threads

  • WIN32/UNIX Interoperability
  • Windows/POSIX Wrappers
  • Object-Oriented Design
  • Thread Creation/Construction
  • Thread Destruction
  • Cancellation
  • Exit
  • Join
  • Suspend
  • Resume
  • Sleep
  • Priority Functions
  • Thread Specific Storage
  • Thread Pooling
  • Mutex Locks
  • Conditional Variables
  • Semaphore Synchronization

General

  • String Classes
  • Memory Buffers
  • Device Caching
  • Linked List Classes
  • Binary Search Tree
  • Stack Classes
  • Queue Classes
  • Date/Time Classes
  • Configuration Manager
  • Log Generator
  • Postscript Text Generator
  • Portable TERM I/O
  • Text Utilities
  • String Utilities
  • Portable Directory Funcitons
  • Portable File Functions

License

The DataReel open source library is copyrighted by DataReel Software Development, Copyright © 2001-2025, all rights reserved. DataReel open source is available to non-profit, commercial, individual, and academic developers. The open-source archive is distributed under the GNU Lesser General Public License (LGPL) with provisions for use in commercial and non-commercial applications under the terms of the LGPL.

Under the terms of the LGPL you can use the open source code in commercial applications as a static or dynamically linked library. This allows commercial developers to compile the library and link to it without making any changes to the DataReel source code.

GNU Lesser General Public License
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, a copy is available on the gnu.org Website:

https://www.gnu.org/licenses/lgpl.html

Supported Platforms

The current Datareel release was developed and tested on Red Hat Enterprise Linux 8/9/10, Windows 10/11, and Windows 2025 server.

The datareel library can be compiled on any Linux variant with the GNU compiler.

The datareel library can be compiled for Windows using Microsoft's Visual Studio.

Legacy platforms in the code base include HPUX and Solaris but make files for legacy platforms are no longer distributed.

Datareel has been compiled for use in 16-bit, 32-bit, and 64-bit applications. The code base still supports 32-bit applications but current development is mainly for use in 64-bit applications.

Supported Compilers

For UNIX the current Datareel release supports GNU and Intel compiler builds. The code base has been used in super computer applications compiled with Cray C++ compilers.

For Windows the current Datareel release supports Microsoft Visual Studio 2022 or 2025.

Previous releases supported cross platform Windows builds using MSVC, Visual C++, BCC, and DJGPP.

Package Map

DataReel Directory Structure 

  • bin - Directory used to intall executables
  • docs - Directory for all DataReel documentation sets
  • env - Makefile includes used to build libraries example programs
  • examples_general - General support example programs
  • examples_database - Database example programs
  • examples_threads - Thread example programs
  • examples_socket - Socket example programs
  • include - DataReel include files
  • lib - Empty directory used to install library files
  • src - DataReel source code files
  • utils - DataReel utility programs

Example Programs

The Datareel distribution contains several example programs. The examples are fully functional programs used to test and demonstrate each component of the library individually. The example programs are located within subdirectories of the "examples_general", "examples_database", "examples_threads", and "examples_socket" directories.

This HTML documentation set include many more example programs that can by used as templates to build applications. 

Code Review and Fixes

On 10/14/2026 the DataReel code in this repository was reviewed and fixed by Claude Code, Anthropic's AI coding assistant (https://claude.ai/code). The review covered compiler warnings, AddressSanitizer and UndefinedBehaviorSanitizer runs of the example programs, and valgrind checks. Fixes include:

  • Mismatched new[]/delete calls in UString, strutil, gxDatabase, MemoryBuffer and other classes
  • Undefined behavior in the gxINT16/32/64 byte packing, UString Find/IFind, and gxConfig::ChangeConfigLine()
  • Bounds checks in POD, gxRDBMS and gxsXML, and leaked buffers in gxSocket
  • Replaced the deprecated readdir_r() and _np robust mutex calls
  • SSL updates for OpenSSL 3: a 2048-bit (RFC 7919 ffdhe2048) default DH group, OpenSSL 3 DH parameter and RSA key interfaces, error checking and cleanup on every path, and new ssl_server example keys, certificate and DH parameters
  • New gxSSL class documentation
  • New documentation pages for gxListB, the thread pool and thread helpers, the XML parser, the RSS feed writer, the RDBMS layer, the B-tree and database caches, the debug manager, ix_debug and the example programs, and a modern style for all documentation pages
  • Fixes for bugs found while writing the new pages: the RDBMS layer, thread helpers and thread pool, XML parser and RSS writer, B-tree and database caches, debug manager, B-tree Find() and gxDatabase

The version number is now 5.10.

See Code Review and Fixes for the full list of fixes, SSL updates and behavior changes. Every change in the source is marked with a "10/14/2026" comment.

Linux Builds

Example install and build:

> mkdir -pv ~/git
> cd ~/git
> git clone https://github.com/datareel/datareel
> cd datareel
> cd env

In the env directory edit the linux.env file if you need to make any adjustments or modifications to the build 

> source gnu_env.sh
> cd ../build
> make 
> make install
> make clean

To build with OpenSSL:

> export USE_OPEN_SSL=YES
> make -f makefile_ssl
> make -f makefile_ssl install
> make -f makefile_ssl clean

To build example programs:

> cd ~/git/datareel/examples_database
> ls -l 
> cd simple
> make

To build utility programs

> cd ~/git/datareel/utils
> ls
> cd hexdump
> make 

Windows Builds

In the example build below we will assume you are working with a copy

of the datareel library unpacked to the "%USERPROFILE%\datareel"

location.


In this document we will assume you have installed Visual Studio 2026

and will be working on the command line.


To setup a command line build open a Run dialog and enter cmd to open

a command prompt.


To setup the VS 2026 environment the msvc.bat file is provided in the

env directory.


To build the datareel static library without SSL enabled:


> cd %USERPROFILE%\datareel

> env\msvc.bat

> cd winslib

> nmake -f msvc.mak


The utility programs and examples programs will link to the static

library.


To build the example programs:


> cd %USERPROFILE%\datareel\examples_general

> cd string_class

> nmake -f msvc.mak


To build the datareel library as a DLL without SSL enabled:


> cd %USERPROFILE%\datareel

> env\msvc.bat

> cd dll

> nmake -f msvc.mak


To build the datareel static library with SSL enabled:


> cd %USERPROFILE%\datareel

> env\msvc.bat

> cd winslib

> notepad openssl.env


In the openssl.env file set the path to your openssl installation directory.


> nmake -f msvc_ssl.mak


The utility programs and examples programs will link to the static

library. Before you can build the utils or example programs with SSL

enabled you must set the path to your openssl install in the following

ENV file:


> cd %USERPROFILE%\datareel\env

> notepad openssl_windows.env


In the openssl_windows.env set the path to your openssl installation

directory.


To build the example programs:


> cd %USERPROFILE%\datareel\examples_socket

> cd https_client

> nmake -f msvc.mak


Before running the example program in you user environment add the

openssl\bin dir to your PATH:


> set PATH=%PATH%;e:\3plibs\openssl\bin


To build the datareel library as a DLL with SSL enabled:


> cd %USERPROFILE%\datareel

> env\msvc.bat

> cd dll

> notepad openssl.env


In the openssl.env file set the path to your openssl installation directory.


> nmake -f msvc.mak