vcpkg

How to statically link VCPKG produced .lib file in Visual Studio

旧城冷巷雨未停 提交于 2020-08-24 08:26:12
问题 I use VCPKG to build third party libraries like libcurl for example. I have dynamic and static builds. Obviously, import .lib and object .lib files are contained in two different folders, x64-windows and x64-windows-static respectively. I want to link object libcurl.lib statically with my program, but cannot figure out how to configure Visual Studio to do it. It always ends up using the import lib, rather than object lib and thus my program ends up requiring libcurl.dll at execution. I have

Cmake question: How do I use vcpkg to install dependencies automatically?

坚强是说给别人听的谎言 提交于 2020-08-24 04:57:28
问题 I'm working on c++ project on a linux machine and it uses several boost libraries. I've installed them on my system using vcpkg and build it using the toolchain provided by vcpkg. My question is: How do I define the dependencies so that they automatically install on a different system, if they were to build it? Conan has a way of doing it by defining the dependencies in conanfile.txt. How do I do the same with vcpkg? Edit1: I've found autovcpkg which does the job I'm looking to do but can the

【包管理器】vcpkg

有些话、适合烂在心里 提交于 2020-04-26 11:05:22
1. vcpkg 介绍 vcpkg 是用于 C++ 的一种命令行包管理器 。 它极大地 简化了 Windows、Linux 和 MacOS 上第三方库的购置与安装。 如果项目要使用第三方库,建议通过 vcpkg 来安装它们。 vcpkg 同时支持开源和专有库。 已测试 vcpkg Windows 目录中所有库与 Visual Studio 2015、Visual Studio 2017 及 Visual Studio 2019 的兼容性。 在 Windows 和 Linux/MacOS 目录之间,vcpkg 现已支持超过 1900 个库。 C++ 社区正在不断向两个目录添加更多的库。一台计算机上可以有多个 vcpkg 克隆。 每一克隆都可以设置为生成带有你首选的编译开关的自定义库集合。 每个克隆都是一个自包含的环境,它自身的 vcpkg.exe 副本仅可在自己的层次结构中运行。 vcpkg 不会被添加到任何环境变量中,并且在 Windows 注册表或 Visual Studio 上也没有依赖项。 对于 Windows 目录中的库,vcpkg 会下载源,而不是二进制文件。 它使用可以找到的最新版 Visual Studio 编译这些源代码。 在 C++ 中,有一点至关重要,即你的应用程序代码以及你所使用的任何库应均是由同一编译器和编译器版本编译的。 通过 vcpkg

【原创】更新vcpkg中的python版本为当前最新版本python3.8.x,并编译boost.python为3.8.x

ⅰ亾dé卋堺 提交于 2020-02-27 15:38:04
vcpkg中当前最新的boost为1.7.2 ,python3为3.7.3,升级到最新的python3.8.1版本步骤如下: 1、先编译python3.8.1的VCPKG库, 修改 ports\python3\ portfile.cmake中的python版本号为 set (PYTHON_VERSION_MAJOR 3) set(PYTHON_VERSION_MINOR 8) set(PYTHON_VERSION_PATCH 1) 2、下载最新版本的 python-cpython-v3.8.1.tar.gz文件到downloads目录中 3、修改scripts/cmake/vcpkg_download_distfile.cmake文件,目的是取消验证所下载的 python-cpython-v3.8.1.tar.gz文件是否与服务器上的一致,我们主要 把验证文件hash值的函数 function (test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE)取消,在该函数内第一行直接加入return()返回即可. 4、vcpkg install python3 即可安装上最新的python3.8.1为VCPKG的库。 5、接下来安装boost.python和我们当前的python3.8.1绑定,补上缺少的python头文件

基于OpenSSL的一些常用加密签名算法

泪湿孤枕 提交于 2020-01-07 05:54:36
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 目前包括:MD5、SHA512、DES、RSA加解密、RSA+MD5签名验证算法,在openssl基础上再进行封装,使用简单,头文件需要包含openssl库,可以使用vcpkg自动管理,省去繁琐的配置工程的过程。 该RSA签名算法中,已将输入明文做了MD5处理。 注意RSA加密算法E,解密算法D,与RSA签名算法S,验证算法V,这里的EDSV互补相等,不要认为加密过程的E使用公钥,验证过程的V也使用公钥,就把两者混为一谈。 一看头文件就显得容易使用了 class COpenSSL { public: COpenSSL(); ~COpenSSL(); // ---- md5摘要哈希 ---- // void md5(const std::string &srcStr, std::string &encodedHexStr); // ---- sha256摘要哈希 ---- // void sha256(const std::string &srcStr, std::string &encodedHexStr); // ---- des对称加解密 ---- // // 加密 ecb模式 std::string des_encrypt(const std::string &clearText, const std:

Cannot build a cmake project in Visual Studio and vcpkg (fatal error C1083)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-09 22:50:16
问题 I installed vcpkg today, enabled integration with Visual Studio, ie .\vcpkg integrate install, and started installing libraries. I basically installed cpprestsdk and that trigger installation of boost libraries. Then I opened the project in the Visual Studio (CMake). When I installed cpprestsdk I received this message: The package cpprestsdk:x86-windows provides CMake targets: find_package(cpprestsdk REQUIRED) # Note: 1 targets were omitted target_link_libraries(main PRIVATE cpprestsdk:

Getting cURL to work with Visual Studios 2017

Deadly 提交于 2019-11-28 07:02:54
*Edit: I got CURL working in VS 2017 on a 64 bit machine following these steps (see below for original problem): First install vcpkg: Clone vcpkg using gitbash into C:\Program Files In a command prompt navigate to C:\Program Files\vcpkg Run in the command prompt: .\bootstrap-vcpkg.bat Run in the command prompt: vcpkg integrate install Then use vcpkg and Visual Studios 2017 command prompt to install cURL: Open a VS 2017 Command prompt and navigate to the vcpkg folder (where the vcpkg.exe is) Run: vcpkg install curl[*]:x64-windows (note this can take around a half hour to download and run, don't

Getting cURL to work with Visual Studios 2017

梦想与她 提交于 2019-11-26 16:21:24
问题 *Edit: I got CURL working in VS 2017 on a 64 bit machine following these steps (see below for original problem): First install vcpkg: Clone vcpkg using gitbash into C:\Program Files In a command prompt navigate to C:\Program Files\vcpkg Run in the command prompt: .\bootstrap-vcpkg.bat Run in the command prompt: vcpkg integrate install Then use vcpkg and Visual Studios 2017 command prompt to install cURL: Open a VS 2017 Command prompt and navigate to the vcpkg folder (where the vcpkg.exe is)