POCO C++ Libraries are now available in biicode

The POCO C++ Libraries are, like their own web recites, “Modern, powerful open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server, mobile and embedded systems“. They were created by Günter Obiltschnig in 2004 and have been extended by enthusiastic C++ developers from all over the world.

POCO C++ Libraries working fine in biicode

Now, you have the following versions available in biicode:

Benefits

biicode is a file based dependency manager, which has many advantages:

  • Save time reusing from any POCO C++ library (Foundation, Net, NetSSL_OpenSSL, etc.) such times as you need and avoid to configure and build out the libraries first. biicode’ll only retrieve the necessary files to build your project.
  • POCO C++ depends on external libraries like zlibPCRE (Perl Compatible Regular Expressions), HPDF, 7-Zip, OpenSSL and SQLite that they’re uploaded on biicode and maintained by our users.
  • It’s been tested on biicode in Windows with Visual Studio 10 and Visual Studio 12, Linux with GCC and Apple with CLang

Note:  if you’re using Windows OS, I recommend you to use Visual Studio to configure your project because with MinGW you could get some errors.

POCO C++ external dependencies

These libraries have many external and third party dependencies to build some of them, e.g., Foundation depends on PCRE and ZLib. Without biicode PCRE and ZLib source files must be present in POCO C++ project, but with biicode it’s not needed. The following table shows all the dependencies for every version uploaded which biicode’ll find if you use all the modules in a project:

POCO external deps found in biicode

So, you’ll not have to worry about to install or build them, biicode does all the effort for you ;) These are the depending blocks in biicode:

Using POCO C++ Libraries in your project

1. Create a new project and an empty block:

2. Add your sample code (orignal code from Net/samples/dict.cpp) into ./blocks/myuser/myblock/sample.cpp

3. Choose which uploaded  POCO version you want to depend on, configure it through your ./blocks/myuser/myblock/biicode.conf  file. Create it and copy the following:

4. Finally, you’d only have to retrieve your POCO dependencies and build your sample.cpp. For it, use this command:

Note: for Windows users, to configure your project with Visual Studio, e.g., 10 version, execute:

So, biicode’ll download all the dependencies from release version 1.6.0 and compile the project. Now, you can run the binary created in your ./bin/ folder.

Use the original #include‘s

Change all the includes from the previous sample.cpp code to:

Now, tell biicode how to find this dependencies, so, modify again the biicode.conf and add the following:

Warning:  take care with Poco/*.h: fenix/poco/Foundation/include because it should always be at the end of [includes] section for being a really wide search pattern.

Finally, clean the metadata and build again the project:

Creating an example with NetSSL_OpenSSL or NetSSL_Win library

Making a project using these libraries is a special use case of original includes. Why? Take a look at the following example:

Like you see, NetSSL_OpenSSL and NetSSL_Win have the same relative inlcude headers, so, the only way to resolve successfully your dependencies is writing the full path for them.

The biicode.conf would be like the previous one.

Build all the POCO C++ samples

Try to build all the available samples Poco brings us with each release. Create a project, open any examples/poco block and build it, e.g., examples from 1.4.7p1 version:

 

So, that’s all! POCO C++ Libraries are amazing and I strongly recommend you to start using them for your network projects.

I hope you enjoy with this post and don’t forget check our complete C++ documentation! If you’ve any doubt, contact us through our forum or ask directly in Stackoverflow

 

[UPDATE]

There is already one project reusing POCO C++ libs using biicode:


First Biicode project with Poco C++ 
by Carlos Martín.

 


Related Posts