Get The POCO C++ Libraries

GitHub

The official POCO C++ Libraries repository is on GitHub. The master branch always reflects the latest release (1.13.2).

$ git clone -b master 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.13.2@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.13.2.tar.gz or poco-1.13.2.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.13.2-all.tar.gz or poco-1.13.2-all.zip) contains all libraries but requires OpenSSL, MySQL Client 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.cmd script to build POCO using the Visual Studio project files.

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

P:\git\poco>buildwin.cmd 160

You can run buildwin.cmd without arguments to see available options.

To omit some libraries from building, edit the components file and remove the lines corresponding to the specific libraries.

Make sure to start the correct Visual Studio command prompt prior to starting buildwin.cmd, otherwise you will see linker errors. Specifically, when building the 64-bit libraries, run from a "x64 Native Tools Command Prompt".

You will also need to set the INCLUDE and LIB environment variables to include the paths for any external dependencies like OpenSSL and MySQL, e.g.:

P:\git\poco>set INCLUDE=%INCLUDE%;C:\OpenSSL-Win64\include
P:\git\poco>set LIB=%LIB%;C:\OpenSSL-Win64\lib
P:\git\poco>buildwin 160 build shared both x64 nosamples notests

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 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.cmd), 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.