Get The POCO C++ Libraries

GitHub

The official POCO C++ Libraries repository is on GitHub. Ongoing development happens in the main branch. Releases are tagged, the latest release is tagged poco-1.14.0-release.

$ git clone -b poco-1.14.0-release https://github.com/pocoproject/poco.git

On GitHub you can also find the CHANGELOG.

Conan

The POCO C++ Libraries are also available via the Conan C/C++ Package Manager.

$ conan install Poco/1.14.0@pocoproject/stable

The official Conan tutorial also uses the POCO C++ Libraries.

vcpkg

The POCO C++ Libraries can be installed via the vcpkg C and C++ library manager on Windows, Linux and macOS.

$ vcpkg install POCO

Signed Packages

We offer two different packages, the Basic Edition and the Complete Edition.

Basic Edition

The Basic Edition (poco-1.14.0.tar.gz or poco-1.14.0.zip) only contains the Foundation, JSON, XML, Util and Net libraries, but does not require any external dependencies.

Complete Edition

The Complete Edition (poco-1.14.0-all.tar.gz or poco-1.14.0-all.zip) contains all libraries but requires OpenSSL, MySQL client libraries, PostgreSQL client libraries and ODBC to compile all of it.

The packages are signed with GPG. The public key can be found on Keybase.io and keyserver.ubuntu.com.

Building POCO

Detailed instructions can be found in the README.

CMake

The recommended way to build POCO is via CMake. CMake release 3.5 or later is required.

From within the POCO source tree, run the following commands:

$ mkdir cmake-build
$ cd cmake-build
$ cmake .. && cmake --build .

You can also run:

$ sudo cmake --build . --target install

in the cmake-build directory to install POCO to /usr/local.

The install directory can be changed by passing the -DCMAKE_INSTALL_PREFIX=/path/to/directory option to CMake during the configuration step.

See the top-level CMakeLists.txt for a list of supported options for enabling and disabling specific libraries.

GNU Make

On Unix systems POCO can be built with GNU Make. The build system implemented in POCO based on GNU Make is quite powerful and can also do cross builds for embedded systems.

From within the POCO source tree, run the following commands:

$ ./configure
$ make -s -j4

The configure script also accepts options. Run:

$ ./configure --help

to see all available options.

You can disable specific libraries by using the --omit option. Example:

$ ./configure --omit=NetSSL_OpenSSL,Crypto

or:

$ ./configure --omit=Data/ODBC,Data/MySQL

You can run:

$ sudo make install

to install POCO to /usr/local.

To change the install directory, pass the --prefix=/path/to/directory option to the configure script.

Visual Studio

POCO includes project and solution files for different Visual Studio versions.

On Windows, run the buildwin.ps1 script to build POCO using the Visual Studio project files.

To build with Visual Studio 2022, from a Visual Studio 2022 Command Prompt, run:

P:\git\poco>buildwin.ps1

You can run buildwin.ps1 with -help to see available options.

To omit some libraries from building, use the -omit option.

External Dependencies

OpenSSL

Most Unix systems already have OpenSSL preinstalled. If your system does not have OpenSSL, please get it from the OpenSSL website or another source. You do not have to build OpenSSL yourself — a binary distribution is fine.

On Debian'ish Linux systems, you can install OpenSSL with:

$ apt-get install libssl-dev

Starting with El Capitan (10.11), macOS no longer includes OpenSSL. The recommended way to install OpenSSL on Mac OS X is via Homebrew:

$ brew install openssl

The Visual Studio project files support OpenSSL via vcpkg and will automatically install OpenSSL.

The easiest way to install OpenSSL on Windows is to use a binary (prebuild) release, for example the installer from Shining Light Productions.
Depending on where you have installed the OpenSSL libraries, you might have to edit the build script (buildwin.ps1), or add the necessary paths to the INCLUDE and LIB environment variables, or edit the Visual C++ projects if the installed OpenSSL libraries have different names than specified in the project file.

ODBC

The Data library requires ODBC for the ODBC connector.

On Windows platforms, ODBC should be readily available if you have the Windows SDK.

On Unix/Linux platforms, you can use iODBC or unixODBC.

MySQL Client

For the Data MySQL connector, the MySQL client libraries and header files are required.

PostgreSQL Client

For the Data PostgreSQL connector, the PostgreSQL client library (libpq) and header files are required.