本文主要记录下Ubuntu下编译Poco C++库的配置项以备后用。系统版本:Ubuntu 16.04,1 Pocohtml
版本:1.9.0基本的步骤以下:linux
1.从官网下载最新的Poco源码,地址是:https://pocoproject.org/download.htmlui
2. 安装Openss库spa
apt-get install libssl-devhtm
3.配置Poco:blog
sudo ./configure --no-tests --no-samples --omit=Data/ODBC,Data/MySQL,MongoDB,PDF --static --cflags=-fPIC --shared --prefix=/home/wgg_126/wgg/compile/poco
编译动态库是默认会生成的库后缀是so + 版本号,如要去掉版本号须要修改源码build/config/下linux文件中SHAREDLIBEXT项,ssl
默认是.so.$(target_version),编译静态库须要加上flag -fPIC,--omit表示 表示忽略的编译模块。get
4.编译 安装源码
makeit
make install
如需交流可加QQ群766718184 或者QQ3501870