一、安装vcpkg

git clone https://github.com/microsoft/vcpkg
bootstrap-vcpkg.bat

二、安装mingw64

https://sourceforge.net 上搜索mingw64,下载mingw-w64-install.exe安装x86_64-8.1.0-posix-seh-rt_v6-rev0。

三、安装开发包

vcpkg search 包名
vcpkg install 包名 --triplet=x64-mingw-dynamic

例如安装sqlite3,它会自动安装相应的依赖,安装完毕的库在Installed文件夹下。

set VCPKG_DEFAULT_TRIPLET=x64-mingw-dynamic
set VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-dynamic
vcpkg install sqlite3 --triplet=x64-mingw-dynamic

vcpkg编译安装mingw64开发包_搜索