- Notifications
You must be signed in to change notification settings - Fork2.3k
The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
License
pocoproject/poco
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- A collection of C++ class libraries, conceptually similar to the Java Class Library or the .NET Framework.
- Focused on solutions to frequently-encountered practical problems.
- Focused on "internet-age" network-centric applications.
- Written in efficient, modern, 100% ANSI/ISO Standard C++.
- Based on and complementing the C++ Standard Library/STL.
- Highly portable and available on many different platforms, from embedded to server.
- Open Source, licensed under theBoost Software License.
To start using POCO, see theGuided TourandGetting Started documents.
- CMake 3.26 or newer
- A C++17 compiler (Visual C++ 2019, GCC 8.0, Clang 5, or newer)
- C++20 is supported and recommended; some features are only available with C++20
- OpenSSL 1.1.1 or newer headers and libraries (optional, but recommended)
- MySQL, PostgreSQL, ODBC, and Apache/APR client libraries (optional)
- C++20, CMake 3.28 or later, and Ninja (for C++ modules)
Most Unix/Linux systems already have OpenSSL preinstalled. If your systemdoes not have OpenSSL, please get it fromhttps://www.openssl.org oranother source. You do not have to build OpenSSL yourself - a binarydistribution is fine. For example, via Debian APT:
$ sudo apt-get install openssl libssl-devOn macOS, the easiest way to install OpenSSL is viaHomebrew:
$ brew install opensslThe easiest way to install OpenSSL on Windows is to use a binary(prebuilt) release, for example the one from Shining LightProductions that comes with aWindows installer.OpenSSL can also be installed via thevcpkg package manager. One mayalso use theWinGetpackage.
On Windows, POCO can also use the native Windows TLS APIs (SChannel).
All dependencies can be installed with the following commands:
$ sudo apt-get -y update && sudo apt-get -y install git g++ cmake libssl-dev libmysqlclient-dev libpq-dev$ sudo dnf install -y git gcc-c++ cmake openssl-devel mysql-devel postgresql-devel$ sudo pacman -Syu --noconfirm git gcc make cmake openssl mariadb-libs postgresql-libs$ brew install cmake openssl mysql-client libpq$ winget install --id -e Git.Git LLVM.LLVM Kitware.CMake ShiningLight.OpenSSL.Dev PostgreSQL.PostgreSQL Oracle.MySQL Microsoft.msodbcsqlCMake (version 3.26 or newer) is the official build system forbuilding the POCO C++ Libraries.
$ git clone -b main https://github.com/pocoproject/poco.git$ cd poco$ mkdir cmake-build$ cd cmake-build$ cmake ..$ cmake --build . --config ReleaseOn macOS, it's necessary to tell CMake where to find the OpenSSL headersand libraries by setting theOPENSSL_ROOT_DIR CMake variable.For example, if OpenSSL has been installed with Homebrew,thecmake invocation becomes:
$ cmake .. -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3On Intel Macs, use/usr/local/opt/openssl@3 instead.
Similarly, the locations of other external libraries can be specified:
$ cmake .. -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3 -DMYSQL_ROOT_DIR=/opt/homebrew/opt/mysql-client -DPostgreSQL_ROOT_DIR=/opt/homebrew/opt/libpqOther common ways of building with CMake (e.g.,cmake-gui) will also work.
There are also a number of project-specific CMake variables that can be changed.
With a proper CMake toolchain file (specified via theCMAKE_TOOLCHAIN_FILE CMake variable),the POCO C++ Libraries can be cross-compiled for embedded Linux systems:
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/mytoolchain.cmake -DCMAKE_INSTALL_PREFIX=/path/to/targetThe POCO C++ Libraries headers and libraries can optionally be installed by building theinstall target.
$ sudo cmake --build . --target installThe default install location is/usr/local/ on Linux and macOS andC:\Program Files\ on Windows and can be overridden by settingtheCMAKE_INSTALL_PREFIX CMake variable.
You can download and install poco using thevcpkg dependency manager:
$ git clone https://github.com/Microsoft/vcpkg.git$ cd vcpkg$ ./bootstrap-vcpkg.sh$ ./vcpkg integrate install$ ./vcpkg install pocoThe poco port in vcpkg is kept up to date by Microsoft team members and community contributors.If the version is out of date, pleasecreate an issue or pull requeston the vcpkg repository.
You can download and install poco using theConanpackage manager. It needs to beinstalled first.
You can install Poco libraries fromConan Center:
$ conan install --requires=poco/1.15.0Or, you can download Poco recipe and build locally:
$ conan install --requires=poco/1.15.0 --build=pocoThe Poco recipe and packages in Conan Center are kept up to date by Conan team members and community contributors.If the version is out of date, or you detect any wrong behavior, pleasecreate an issue or pull requeston the Conan Center Index repository.
If you do not want to or cannot use CMake, POCO can also be built with GNU Make(Linux, macOS and other supported Unix platforms).
Please refer to thedocumentation for more information.
POCO can also be obtained via differentpackage managers.
POCO has an active user and contributing community, please visit ourwebsite andblog.Answers to POCO-related questions can also be found onStack Overflow.
Please seeCONTRIBUTING for submitting contributions, bug reports, feature requests or security issues.
In regards to Boost, in spite of some functional overlapping,POCO is best thought of as a Boost complement (rather than replacement).Side-by-side use of Boost and POCO is a very common occurrence.
About
The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.

