CPP库-POCO

注意 http 模块不能再线程里面调用,否则退出时会有内存泄漏.

restful service

使用 vcpkg 安装

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
PS> .\bootstrap-vcpkg.bat

// Then, to hook up user-wide integration, run (note: requires admin on first use)
PS> .\vcpkg integrate install

// To remove the integration for your user, you can use
.\vcpkg integrate remove.

CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake"

Install any packages with
PS> .\vcpkg install sdl2 curl

git clone https://github.com/Microsoft/vcpkg.git
vcpkg install POCO

设置一下第三方库:
buildwin.cmd里面配置openssl和mysql的目录

  1. 编译openssl

下载openssl1.1.1b,按照poco里面的,拷贝到C:\OpenSSL

  1. MySQL
    下载Connector/C 6.1.11即可,用的是里面的include和lib

  2. 编译

C:\%POCO_BASE%\openssl\build.ps1 -openssl_release 1.1.0 -vs_version 150 -config both -platform Win32 -library shared

buildwin 140 build static_mt both Win32 samples tests msbuild

没有 openssl 等第三方库

vs2015 版本,使用 build 命令行执行下面命令

buildwin.cmd 140 build all release Win32 samples tests msbuild