Welcome

Thank you for downloading the POCO C++ Libraries and welcome to the growing community of POCO C++ Libraries users. This document will help you in getting a smooth ride while installing and setting up the POCO C++ Libraries and going the first steps with the software.

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.

Note: There are binary releases available as installation packages for various operating systems (e.g., Debian Linux, Ubuntu Linux, OpenBSD, OpenWRT, etc.). However, these packages are not maintained by the core team and may not always be up to date.

Source Code Distribution Format

The source code for the POCO C++ Libraries is delivered in a ZIP file for Windows users and/or in a compressed TAR file (.tar.gz or .tar.bz2) for Unix/Linux users. Both archives contain the same files, the only difference is that all text files in the ZIP files have line endings suitable for Windows (CR-LF), while the text files in the TAR file have line endings suitable for Unix/Linux (LF only). All libraries and tools follow a common convention for the directory layout. This directory layout is shown below.

build/                     the build system for Unix/OpenVMS and additional utility scripts
config/ build configurations for various Unix platforms
rules/ common build rules for all platforms
scripts/ build and utility scripts
vms/ OpenVMS build system scripts
vxconfig/ VxWorks build configurations bin/ all executables (dynamic link libraries on Windows)
bin64/ all 64-bit executables (and DLLs) doc/ additional documentation lib/ all libraries (import libraries on Windows)
lib64/ all 64-bit libraries CppUnit/ project and make/build files for the CppUnit unit testing framework
doc/ additional documentation
include/
CppUnit/ header files for CppUnit
src/ source files for CppUnit
WinTestRunner/ Windows GUI for CppUnit Foundation/ project and make/build files for the Foundation library
include/
Poco/ header files for the Foundation library
src/ source files for the Foundation library
testsuite/ project and make/build files for the Foundation testsuite
src/ source files for the Foundation testsuite
bin/ test suite executables
samples/ sample applications for the Foundation library XML/ project and make/build files for the XML library
include/
Poco/
XML/ header files for the core XML library
SAX/ header files for SAX support
DOM/ header files for DOM support
src/ source files for the XML library
testsuite/ project and make/build files for the XML testsuite
src/ source files for the XML testsuite
bin/ test suite executables
samples/ sample applications for the XML library Net/ project and make/build files for the Net library
include/
Poco/
Net/ header files for the Net library
src/ source files for the Net library
testsuite/ project and make/build files for the Net testsuite
src/ source files for the Net testsuite
bin/ test suite executables
samples/ sample applications for the Net library

Depending on what package you have downloaded (Basic or Complete Edition), there may be other libraries as well (such as Data, Crypto, NetSSL_OpenSSL and Zip).

External Dependencies

The following libraries require third-party software (header files and libraries) being installed to build properly:

  • NetSSL_OpenSSL and Crypt require OpenSSL.
  • Data/ODBC requires ODBC (Microsoft ODBC on Windows, unixODBC or iODBC on Unix/Linux)
  • Data/MySQL requires the MySQL client.

OpenSSL

Most Unix/Linux systems (including Mac OS X) already have OpenSSL preinstalled, or OpenSSL can be easily installed using the system’s package management facility. For example, on Ubuntu (or other Debian-based Linux distributions) you can type

$ sudo apt-get install openssl libssl-dev

to install the necessary packages. If your system does not have OpenSSL, please get it from http://www.openssl.org/ or another source. You do not have to build OpenSSL yourself — a binary distribution is fine.

The easiest way to install OpenSSL on Windows is to use a binary (prebuild) release, for example the one from Shining Light Productions that comes with a Windows installer (http://www.slproweb.com/products/Win32OpenSSL.html). 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. You might also have to edit the project settings if the names of the OpenSSL libraries from your build differ from the names used in the project files.

ODBC

The Data library requires ODBC support on your system if you want to build the ODBC connector (which is the default). On Windows platforms, ODBC should be readily available if you have the Windows SDK installed. On Unix/Linux platforms, you can use iODBC (preinstalled on Mac OS X) or unixODBC. On Linux, use your distribution's package management system to install the necessary libraries and header files. For example, on Ubuntu, type

$ sudo apt-get install libiodbc2 libiodbc2-dev

to install the iODBC library and header files.

The Data/ODBC and Data/MySQL Makefiles will search for the ODBC and MySQL headers and libraries in various places. Nevertheless, the Makefiles may not be able to find the headers and libraries. In this case, please edit the Makefile in Data/ODBC and/or Data/MySQL accordingly.

MySQL Client

The Data library requires the MySQL client libraries and header files if you want to build the MySQL connector (which is the default). On Windows platforms, use the MySQL client installer to install the necessary files. On Unix/Linux platforms, use the package management system of your choice to install the necessary files. Alternatively, you can of course build MySQL yourself from source.

Building On Windows

Microsoft Visual Studio 7.1 (2003), 8.0 (2005), 9.0 (2008) or 10.0 (2010) is required to build the POCO C++ Libraries on Windows platforms. Solution and project files for all versions are included. For Visual Studio 2008 and 2010, 64-bit (x64) builds are supported as well. You can either build from within Visual Studio (Build->Batch Build->Select All;Rebuild) or from the command line. To build from the command line, start the Visual Studio .NET 2003/2005/2008/2010 Command Prompt and go (cd) to the directory where you have extracted the POCO C++ Libraries sources. Then, simply start the buildwin.cmd script and pass as argument the version of visual studio (71, 80, 90 or 100). You can customize what is being built by buildwin.cmd by passing appropriate command line arguments to it. Call buildwin.cmd without arguments to see what is available.

To disable certain components (e.g., NetSSL_OpenSSL or Data/MySQL) from the build, edit the text file named components in the distribution root directory and remove the respective lines.

Certain libraries, like NetSSL_OpenSSL, Crypto or Data/MySQL have dependencies to other libraries. Since the build script does not know where to find the necessary header files and import libraries, you have to either add the header file paths to the INCLUDE environment variable and the library path to the LIB environment variable, or you'll have to edit the buildwin.cmd script, where these environment variables can be set as well.

In order to run the test suite and the samples, the top-most bin directory containing the resulting shared libraries must be in the PATH environment variable.

Building On Unix/Linux/Mac OS X

For building on Unix platforms, the POCO C++ Libraries come with their own build system. The build system is based on GNU Make 3.80 (or newer), with the help from a few shell scripts. If you do not have GNU Make 3.80 (or newer) installed on your machine, you will need to download it from http://directory.fsf.org/devel/build/make.html and build and install it prior to building the POCO C++ Libraries.

You can check the version of GNU Make installed on your system with

$ gmake --version

or

$ make --version

Once you have GNU Make up and running, the rest is quite simple. To extract the sources and build all libraries, testsuites and samples, simply

$ gunzip poco-X.Y.tar.gz
$ tar -xf poco-X.Y.tar
$ cd poco-X.Y
$ ./configure
$ gmake -s

See the configure script source for a list of possible options. For starters, we recommend --no-tests and --no-samples, to reduce build times. On a multicore or multiprocessor machine, use parallel makes to speed up the build (make -j4).

Once you have successfully built POCO, you can install it to /usr/local (or another directory specified as parameter to configure --prefix=<path>):

$ sudo gmake -s install

You can omit certain components from the build. For example, you might want to omit Data/ODBC or Data/MySQL if you do not have the corresponding third-party libraries (iodbc or unixodbc, mysqlclient) installed on your system. To do this, use the --omit argument to configure:

$ ./configure --omit=Data/ODBC,Data/MySQL

IMPORTANT: Make sure that the path to the build directory does not contain symbolic links. Furthermore, on Mac OS X (or other systems with case insensitive filesystems), make sure that the characters in the path have the correct case. Otherwise you'll get an error saying "Current working directory not under $PROJECT_BASE.".

Building On QNX Neutrino

For QNX Neutrino, the Unix build system (see the instructions above) is used. You can use the build system to cross-compile for a target platform on a Solaris or Linux host. Unfortunately, the Cygwin-based Windows host environment has some major quirks that prevent the build system from working there. You can also use the build system on a self-hosted QNX system. The default build configuration for QNX (found in build/config/QNX) is for a self-hosted x86 platform. To specify another target, edit the CCVER setting in the build configuration file. For example, to compile for a PowerPC target, specify CCVER=3.3.1,gcc_ntoppcbe.

Service Pack 1 for QNX Neutrino 6.3 must be installed, otherwise compiling the Foundation library will fail due to a problem with the <list> header in the default (Dinkumware) C++ standard library.

When building on QNX, you might want to disable NetSSL_OpenSSL, Crypto and some Data connectors, unless you have the necessary third party components available:

$ ./configure --omit=NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQL

Tutorials And Sample Code

Introductory documentation consisting of various documents and tutorials in the form of slide decks can be found at the POCO C++ Libraries Documentation]] page.

Sample applications demonstrating the various features of the POCO C++ Libraries are delivered with the source code. Every library's source code directory has a samples directory containing various sample applications.

When building the sample applications on platforms using the gmake-based build system, please make sure that the environment variable POCO_BASE contains the path to the POCO C++ Libraries source tree root directory.

Creating Your Own POCO-based Applications

The best way to create your first POCO-based application is by copying one of the sample projects and making the desired changes. Examine the project files and Makefiles to see what compiler options must be set for your specific platform.

POCO C++ lib开发环境构建的更多相关文章

  1. ESP32 Eclipse开发环境构建与问题总结

    搞了一个多星期的eclipse环境构建,终于成功了,在此记录下期间遇到的问题. 以下为遇到的几点问题的解决方法: 1.使用的版本为V3.1版本,版本时间为2018年09月07日,可以直接在以下路径下载 ...

  2. 嵌入式实时操作系统VxWorks入门――开发环境构建[转]

    VxWorks 操作系统是美国WindRiver公司于1983年设计开发的一种嵌入式实时操作系统(RTOS),它以其良好的可靠性和卓越的实时性被广泛地应用在通 信.军事.航空.航天等高精尖技术及实时性 ...

  3. 嵌入式linux开发环境构建

    2.1硬件环境构建 2.1.1主机与目标板结合的交叉开发模式 在主机上编辑.编译软件,然后再目标办上运行.验证程序. 对于S3C2440.S3C2410开发板,进行嵌入式Linux开发时一般可以分为以 ...

  4. Spark 1.0 开发环境构建:maven/sbt/idea

    因为我原来对maven和sbt都不熟悉,因此使用两种方法都编译了一下.下面记录一下编译时候遇到的问题.然后介绍一下如果使用IntelliJ IDEA 13.1构建开发环境. 首先准备java环境和sc ...

  5. Spark的Java开发环境构建

    为开发和调试SPark应用程序设置的完整的开发环境.这里,我们将使用Java,其实SPark还支持使用Scala, Python和R.我们将使用IntelliJ作为IDE,因为我们对于eclipse再 ...

  6. java开发环境构建

    一. 基本工具安装 1. 配置终端命令别名 vim ~/.bash_profile *********************************************** # for colo ...

  7. zju(1)嵌入式开发环境构建

    1. 实验目的 搭建嵌入式开发环境,安装ubntu,编译交叉工具链,安装配置tftp,nfs.用makefile 编译几个文件,在实验台上运行. 2. 实验内容 1) 安装ubuntu12.04 2) ...

  8. Ubuntu16.04之开发环境构建

    Ubuntu软件安装相对于centos而言,那真的是要愉快的多啊! 以下安装步骤,本人在公司的测试环境和开发环境以及之前个人虚拟机的测试或生产环境都测验过,基本没有问题,只要按照步骤来,即可马到成功! ...

  9. 04_Windows平台Spark开发环境构建

    Spark的开发环境,可以基于IDEA+Scala插件,最终将打包得到的jar文件放入Linux服务器上的Spark上运行 如果是Python的小伙伴,可以在Windows上部署spark+hadoo ...

随机推荐

  1. Oracle 关于V$OPEN_CURSOR

    参考链接:http://www.askmaclean.com/archives/about-dynamic-view-open_cursor.html#wrap 在之前的一次讨论中,有同行指出V$OP ...

  2. Oracle集合操作函数:union、intersect、minus

    [转]Oracle集合操作函数:union.intersect.minus 集合操作符专门用于合并多条select 语句的结果,包括:UNION, UNION ALL, INTERSECT, MINU ...

  3. “Zhuang.Data”轻型数据库访问框架(一)开篇介绍

    目录: “Zhuang.Data”轻型数据库访问框架(一)开篇介绍 “Zhuang.Data”轻型数据库访问框架(二)框架的入口DbAccessor对象 框架介绍 该框架主要用于数据库访问,封装了包括 ...

  4. Excel Sheet Row Numbers

    Given the sequence S1 = {a,b,c,d,…,x,y,z,aa,ab,ac…. } and given that this sequence corresponds (term ...

  5. Java学习之网络编程

    转自:http://blog.csdn.net/driverking/article/details/6573992 一.网络编程基本概念 1.OSI与TCP/IP体系模型 2.IP和端口 解决了文章 ...

  6. Chrome设计文档-多进程架构

    chromium multi-process architecture 本文档从high-level的角度描述Chromium的多进程架构. 问题 要构建一个决不崩溃或挂起的渲染引擎几乎是不可能的.同 ...

  7. 物理DG主备库切换时遇到ORA-16139: media recovery required错误

    在物理DG主备库切换时遇到ORA-16139: media recovery required错误 SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRI ...

  8. QVector 和vector的比较

    QVector和vector的比较: Qvector默认使用隐式共享,可以用setSharable改变其隐式共享.使用non-const操作和函数将引起深拷贝.at()比operator[](),快, ...

  9. EBS OAF 开发中的OAMessageRadioGroup控件

    EBS OAF 开发中的OAMessageRadioGroup控件 (版权声明,本人原创或者翻译的文章如需转载,如转载用于个人学习,请注明出处:否则请与本人联系,违者必究) 简单介绍 RadioGro ...

  10. [C# 基础知识系列]专题六:泛型基础篇——为什么引入泛型

    引言: 前面专题主要介绍了C#1中的2个核心特性——委托和事件,然而在C# 2.0中又引入一个很重要的特性,它就是泛型,大家在平常的操作中肯定会经常碰到并使用它,如果你对于它的一些相关特性还不是很了解 ...