vcpkg工具+vs2019
好处
自动处理库依赖, 不需额外配置库 include路径 和库 lib路径
Applied user-wide integration for this vcpkg root.All MSBuild C++ projects can now #include any installed libraries.
Linking will be handled automatically.
Installing new libraries will make them instantly available.CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=F:/GIT/vcpkg/scripts/buildsystems/vcpkg.cmake"
安装
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat
vcpkg integrate install//安装jsoncpp 32位库 可省略冒号后内容
vcpkg install jsoncpp 或vcpkg install jsoncpp:x86-windows //安装jsoncpp detours位库
vcpkg install detours:x64-windows //安装//如果想在任意位置使用vcpkg 请把 vcpkg.exe 路径加入PATH环境变量中
新建个工程看配置中出现vcpkg即成功
有些文件可能下载失败
2022-2-21 23:58:33
这里我统一打包,放到对应 downloads目录下,可能过期
https://download.csdn.net/download/u012787710/81785983
vc 源文件中引用即可,不需额外配置了
#include <iostream>
#include <windows.h>#include <detours/detours.h>
#include <json/json.h>void main()
{DetourTransactionBegin();Json::Reader reader;Json::Value root;if (reader.parse("{\"code\":200}", root)) {printf("code:%d\n", root["code"].asInt());// 200}system("pause");
}
附录相关命令参数
vcpkg --help
Commands:vcpkg search [pat] Search for packages available to be builtvcpkg install <pkg>... Install a packagevcpkg remove <pkg>... Uninstall a packagevcpkg remove --outdated Uninstall all out-of-date packagesvcpkg list List installed packagesvcpkg update Display list of packages for updatingvcpkg upgrade Rebuild all outdated packagesvcpkg x-history <pkg> (Experimental) Shows the history of CONTROL versions of a packagevcpkg hash <file> [alg] Hash a file by specific algorithm, default SHA512vcpkg help topics Display the list of help topicsvcpkg help <topic> Display help for a specific topicvcpkg integrate install Make installed packages available user-wide. Requires adminprivileges on first usevcpkg integrate remove Remove user-wide integrationvcpkg integrate project Generate a referencing nuget package for individual VS project usevcpkg integrate powershell Enable PowerShell tab-completionvcpkg export <pkg>... [opt]... Exports a packagevcpkg edit <pkg> Open up a port for editing (uses %EDITOR%, default 'code')vcpkg create <pkg> <url> [archivename]Create a new packagevcpkg x-init-registry <path> Initializes a registry in the directory <path>vcpkg format-manifest --all Formats all vcpkg.json files. Run this before committing to vcpkg.vcpkg owns <pat> Search for files in installed packagesvcpkg depend-info <pkg>... Display a list of dependencies for packagesvcpkg env Creates a clean shell environment for development or compilingvcpkg version Display version informationvcpkg contact Display contact information to send feedbackOptions:--triplet=<t> Specify the target architecture triplet. See 'vcpkg help triplet'(default: %VCPKG_DEFAULT_TRIPLET%)--host-triplet=<t> Specify the host architecture triplet. See 'vcpkg help triplet'(default: %VCPKG_DEFAULT_HOST_TRIPLET%)--overlay-ports=<path> Specify directories to be used when searching for ports(also: %VCPKG_OVERLAY_PORTS%)--overlay-triplets=<path> Specify directories containing triplets files(also: %VCPKG_OVERLAY_TRIPLETS%)--binarysource=<path> Add sources for binary caching. See 'vcpkg help binarycaching'--x-asset-sources=<path> Add sources for asset caching. See 'vcpkg help assetcaching'--downloads-root=<path> Specify the downloads root directory(default: %VCPKG_DOWNLOADS%)--vcpkg-root=<path> Specify the vcpkg root directory(default: %VCPKG_ROOT%)--x-buildtrees-root=<path> (Experimental) Specify the buildtrees root directory--x-install-root=<path> (Experimental) Specify the install root directory--x-packages-root=<path> (Experimental) Specify the packages root directory--x-json (Experimental) Request JSON output@response_file Specify a response file to provide additional parametersFor more help (including examples) see the accompanying README.md and docs folder.
vcpkg help triplet
Available architecture triplets
VCPKG built-in triplets:arm-uwparm64-windowsx64-linuxx64-osxx64-uwpx64-windows-staticx64-windowsx86-windowsVCPKG community triplets:arm-androidarm-iosarm-linuxarm-mingw-dynamicarm-mingw-staticarm-neon-androidarm-windows-staticarm-windowsarm64-androidarm64-iosarm64-linuxarm64-mingw-dynamicarm64-mingw-staticarm64-osx-dynamicarm64-osxarm64-uwparm64-windows-static-mdarm64-windows-staticarmv6-androidppc64le-linuxs390x-linuxwasm32-emscriptenx64-androidx64-freebsdx64-iosx64-linux-releasex64-mingw-dynamicx64-mingw-staticx64-openbsdx64-osx-dynamicx64-osx-releasex64-windows-releasex64-windows-static-mdx86-androidx86-freebsdx86-iosx86-mingw-dynamicx86-mingw-staticx86-uwpx86-windows-static-mdx86-windows-staticx86-windows-v120
vcpkg工具+vs2019相关推荐
- Win10+vcpkg+g2o+vs2019配置
Win10+vcpkg+g2o+vs2019配置 参考: Windows+Visual Studio下生成g2o库教程(结合Cholmod库) 2021.7.13更新:可用.\vcpkg.exe in ...
- vcpkg安装_[工具]包管理工具Vcpkg 的使用
vcpkg是Microsoft的跨平台开源软件包管理器,极大地简化了 Windows.Linux 和 macOS 上第三方库的购置与安装.如果项目要使用第三方库,建议通过 vcpkg 来安装它们.vc ...
- OpenMVS+Win10+VS2019+vcpkg编译及问题
Win10 + VS2019 + OpenMVS1.1.1 + Vcpkg 1 VS2019安装 2 git安装 3 vcpkg安装 3.1下载vcpkg 3.2安装vcpkg 3.3 配置环境变量 ...
- 【包管理器】vcpkg
1. vcpkg 介绍 vcpkg 是用于 C++ 的一种命令行包管理器. 它极大地简化了 Windows.Linux 和 MacOS 上第三方库的购置与安装. 如果项目要使用第三方库,建议通过 vc ...
- VS2019编写简单的C程序示例
前面两天分别介绍了C语言学习路线和初识C语言 今天我们正式了解C语言程序,和学习其它语言一样,先从Hello World开始. 在此先说一下使用的编程工具,工具有好多种,这里使用的最新的工具VS201 ...
- dlib+VS2019生成踩坑记录(Windows10环境)
dlib+VS2019生成记录 1. 准备工具 VS2019 请读者参考<VS2019安装和使用教程(超详细)> cmake 下载地址 分别对应解压版和硬盘安装版,解压版解压后要自行添加环 ...
- 利用vcpkg编译InfluxDB-cxx库
1.背景介绍 vcpkg工具是微软的开源软件C++编译发布平台 InfluxDB-CXX是利用curl和boost实现的Influxdb的C++客户端,同类产品还有InfluxDB-cpp库等,这些库 ...
- VS2019 Qt开发环境搭建与配置
目录 更新说明 学习Qt.安装Qt环境的困扰 问题1:该选什么操作系统,该用MinGW还是msvc ? 问题2:如果用visual studio该安装哪个qt版本? 问题3:Qt开发商业软件需要付费授 ...
- Visual Studio 2019 发行说明
原文:https://docs.microsoft.com/zh-cn/visualstudio/releases/2019/release-notes 单击按钮即可下载最新版 Visual Stud ...
- C#MUD英雄大作战二、乔峰篇(副源码文件连接)
目录 开发环境: 编码 源码地址: 开发环境: 系统环境:Win10 开发工具:VS2019 语言:C# 项目:控制台应用(.NET Framework) 编码 英雄类:(更换namespace即可) ...
最新文章
- 计算机二级理工类报哪个,计算机二级考哪一科目,毕业后找工作会对科目有要求吗?还是说不管什么科目有证就行了?...
- springboot @JsonSerialize 的使用
- MVC学习之简单的CRUD
- type-c接口图片_TypeC接口除了充电还能干吗?这些功能都不知道,简直是在浪费...
- 深度理解 Virtual DOM
- MonoRail学习笔记十八:在VM中可以使用哪些系统变量
- android 导入modoule_android studio如何创建一个子module并引入主工程
- 中国风古典传统中式花纹边框图案PSD素材
- 解决Maven项目pom文件中出现的错误:Missing artifact oracle:ojdbc7:jar:12.1.0.2.0:compile
- 猎头推荐转行大数据分析师骗局
- stata基础使用教程(操作版)
- 华为云、百度云 群控系统开发流程
- 实现多数据源混合计算的方案之一
- unity碰撞检测的几种函数
- 内部类和匿名类的介绍
- MacOS系统tomcat修改端口到80(端口转发)
- zz from newsmth e进制是信息表示的最优解
- GB/T25915.1法规基本标准-洁净室按粒子浓度划分洁净
- 如何优雅的刷LeetCode
- 认识3dmax 轴心