先决条件
- cmake工具安装
- wget https://github.com/Kitware/CMake/releases/download/v3.19.1/cmake-3.19.1.tar.gz
- tar -xvf cmake-3.19.1.tar.gz
- cd cmake-3.19.1/
- ./bootstrap && make && sudo make install
- gcc版本太老无法支持C14,升级安装7.2 gcc
- wget https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.gz
- tar -xvf gcc-7.2.0.tar.gz
- cd gcc-7.2.0/
- ./contrib/download_prerequisites (下载依赖库)
执行上述命令一直下载失败,故手动下载如下文件到当前目录,然后再执行./contrib/download_prerequisites命令即可成功
https://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2
https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2
https://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz
https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2 - ./configure --prefix=/usr --enable-languages=c,c++ --disable-multilib
- make
- make install
poco源码编译
- wget https://github.com/pocoproject/poco/archive/poco-1.10.1-release.tar.gz
- tar -xvf poco-1.10.1-release.tar.gz
- cd poco-poco-1.10.1-release
- mkdir mybuild && cd mybuild
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON
- make && make install
网友评论