Contents (hide)
  1 What to do first when I "must" use POCO

  2 What is the POCO library?
  3 Where is it installed in the lab?
  4 Can I see some example?
  5 Can I have more examples?

The POCO Library

What to do first when I "must" use POCO library?

Using POCO is easy. It requires you to re-use a well designed, well documented and well tested library to achieve many of the tasks you are interested in accomplishing. These are all important skills.

What is the POCO library?

POCO is an open-source third-party library, which contains a collection of C++ class libraries that simplify and accelerate the development of network-centric, portable applications in C++. The libraries integrate perfectly with the C++ Standard Library (STL) and fill many of the functional gaps left open by it.

The POCO libraries free developers from re-inventing the wheel, and allow them to spend their time on more worthwhile areas, such as getting things done quickly and working on the features that make their application unique.

POCO aims to be for cross-platform C++ software development environment. This library wraps the c++ in a way the any programmer's request from the run time environment will be through POCO.

Step-by-step how to use Poco (or other third party library)

  1. Look for the documentation of the class that you are interested in using. (Look at index.html), understand what this class can do, look for its constructor, see what members it has, look at the unit tests of this class, try to find examples using your desired class.
  2. Include the h file that contains the desirable class – Add this file directory to the makefile and to the project properties. If you are working with eclipse add the h file to your project: "right click on the project, properties, C/C++ build, setting, GCC C++ compiler, Directories, add".
  3. add the library to the linker. In eclipse, add to "right click on the project, properties, C++ Linker, commands" the library name (for example: libPocoFoundationd) and "right click on the project, properties, C++ Linker, library, library search path" the location of the desirable library.
  4. Use the classes and function in your implementation.

Where is it installed in the lab?

The h files are located in /usr/include

The lib (.so) files are located in /usr/lib

Can I see some example?

Sure, take a look at the following examples:

  • How to use the logger, time and reading from .ini files using linux-eclips here.
  • The same example for windows-visual studio here.
(the same example from the assignment 2 main page).

Can I have more examples?

Yes, POCO library is well documented and many examples are available. Download the complete POCO. In each library (Foundation, util, XML, net) you will find a folder named "sample". This folder contains examples to (almost) every major POCO classes.