Sapan Diwakar

Software developer

Follow me on Twitter Check out my code on GitHub View some of my designs on Dribbble Take a look at my Linked In profile

Quick start for POCO C++ Library

It's been a while since my last post, but haven't got inspiration to write new ones. I have recently started a new big project which is using POCO C++ Libraries, so I will share my latest revelations about development regarding this. In this post I'll show you how to get started with POCO C++ Libraries.

The POCO here stands for the POCO C++ libraries and is not to be confused with Plain Old CLR Object. I'm not going deeper into what is POCO? For those who don't know POCO is a modern, powerful collection of open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server and embedded systems. Recently I needed to run it on my Windows machine with Microsoft Visual Studio but due to lack of tutorial I couldn't find and documents which describes me how to use it. I had a hard time in figuring out it, so just wanted to share it with you.

First thing you will need is Microsoft Visual Studio, I used professional version for it, but you can use any version. The second thing you will need is POCO C++ libraries. You can download the latest Poco version (complete edition) from here.

Setting up The POCO C++ Libraries:

The POCO C++ Libraries are delivered in full source code only. Due to the large number of possible build configurations, no binary releases are provided from the project maintainers. This means that you have to build the libraries and tools before you can use them the first time. To do this start the Visual Studio Command Prompt (From the start menu -> Microsoft Visual Sudio XXXX -> Visual Studio Tools -> Visual Studio Command Prompt) and cd to the directory where you have extracted the POCO C++ Libraries sources. Then, simply starts the build_XXX.cmd file corresponding to your version of visual studio (check the about dialog to find the version number). Make sure to enter correct version number.

Once you build it, you're ready to go!

You'll also need to add bin directory to PATH system variable and also set new environment variable named POCO_BASE to POCO directory.

To add libraries to your project go to project properties -> Configuration Properties -> C/C++ and add ../include;../Foundation\include;../XML\include; according to your need in additional include directories. I needed XML that's why I used XML in the path along with Foundation library.

I just started using POCO C++ libraries so if you found any mistakes in the post, feel free to contact me.