在window下使用MinGW编译poco
使用MSYS
下载MSYS
官网介绍:http://www.mingw.org/wiki/Getting_Started
官网下载:https://jaist.dl.sourceforge.net/project/mingw/Installer/mingw-get-setup.exe
安装
运行mingw-get-setup.exe,只选择安装msys-base(mingw我使用Qt中自带的)
配置
打开C:\MinGW\msys\1.0\msys.bat,在开头添加
set PATH=D:\2-software\qt\qt5.6\Tools\mingw492_32\bin:$PATH
注:set PATH=[MinGW的目录]
运行MSYS
双击C:\MinGW\msys\1.0\msys.bat,进入终端界面,执行gcc -v查看版本是否正确。
编译poco
1 进入poco的源码目录中,执行配置命令
./configure --minimal --config=MinGW --no-tests --no-samples --shared --static
2 make
执行完毕,在poco-1.7.9/lib/MinGW中将会出现相应的库
3 make install
(该步骤没有亲自验证,可能有误)
如果在-prefix中指定安装路径,则在该目录中生成bin、include、lib等。