Ubuntu下编译Poco库

    本文主要记录下Ubuntu下编译Poco C++库的配置项以备后用。系统版本:Ubuntu 16.04,1 Poco

版本:1.9.0基本的步骤如下:

     1.从官网下载最新的Poco源码,地址是:https://pocoproject.org/download.html

     2. 安装Openss库

  apt-get install libssl-dev

    3.配置Poco:

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项,

   默认是.so.$(target_version),编译静态库需要加上flag -fPIC,--omit表示 表示忽略的编译模块。

   4.编译 安装

      make

      make install

  如需交流可加QQ群766718184 或者QQ3501870

猜你喜欢

转载自www.cnblogs.com/wanggang123/p/10909668.html