vs 2019 默认使用MD, 需要链接vcpkg 静态库(x86-windows-static-md/x64-windows-static-md) 描述可能的解决方案 之前使用 cmake CMake 最低版本号要求 cmake_minimum_required (VERSION 2.8) 设置VCPKG_ROOT所在的位置 set(CMAKE_TOOLCHAIN_FILE "$ENV{Vcpkg_BuildSystemPath}/vcpkg.cmake") set(VCPKG_TARGET_...
<VcpkgTriplet>x86-windows-static</VcpkgTriplet> <VcpkgEnabled>true</VcpkgEnabled> </PropertyGroup> 在CMake 里面, 你可以使用 `-DVCPKG_TARGET_TRIPLET=x86-windows-static 加上普通的工具参数列表来覆盖自动识别的参数。cmake .. -DCMAKE_TOOLCHAIN_FILE=.../vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-...
# x86-windows-static.cmakeset(VCPKG_TARGET_ARCHITECTUREx86)set(VCPKG_CRT_LINKAGEstatic)set(VCPKG_LIBRARY_LINKAGEstatic) 它大概意思就是 x86平台。 运行库采用静态链接(即 /MT /MTd)。 编译为静态库(lib,纯obj组成的那种)。 我们复制一份,取名叫”triplets/x86-windows-static-ltl.cmake“。 第二步 然后...
curl[core]:x86-windows-static nghttp2[core]:x86-windows-static Additional packages (*) will be modified to complete this operation. Starting package 1/2: nghttp2:x86-windows-static Building package nghttp2[core]:x86-windows-static... -- CURRENT_INSTALLED_DIR=C:/Users/Dreg/Downloads/vcpkg-...
vcpkg install thrift:x64-windows 1. 如果要使用静态链接版本[1],则输入命令 vcpkg install thrift:x86-windows-static vcpkg install thrift:x64-windows-static 1. 2. 这样在我们的代码中,就可以直接使用thrift这个库了。 参考文档 [Vcpkg updates: Static linking is now available](https://blogs.ms...
x64-windows-static x64-windows x86-windows VCPKG community triplets: arm-ios arm-linux arm-mingw-dynamic arm-mingw-static arm-windows arm64-ios arm64-linux arm64-mingw-dynamic arm64-mingw-static arm64-osx arm64-uwp arm64-windows-static-md ...
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet> </PropertyGroup> In CMake, you can override the auto-detected DLL triplet using `-DVCPKG_TARGET_TRIPLET=x86-windows-static` along with the normal toolchain argument. For example: ...
x86-windows-static x86-windows 这个清单以后随着版本的迭代还会再增加。vcpkg 不仅支持 x86 架构,还支持 arm 架构。注意:这里的 arm 架构特指类似于 surface 这种运行在 arm 处理器上的 Win10 平台,而并非我们传统意义上的 Linux 或 android 的 ARM 平台。
x86-windows VCPKG community triplets: arm-ios arm-linux arm-mingw-dynamic arm-mingw-static arm-windows arm64-ios arm64-linux arm64-mingw-dynamic arm64-mingw-static arm64-osx arm64-uwp arm64-windows-static-md arm64-windows-static ppc64le-linux ...
如果不指定安装的架构,vcpkg默认把开源库编译成x86的Windows版本的库。那vcpkg总共支持多少种架构呢?我们可以使用如下命令便知: .\vcpkg.exe help triplet 我们可以看到会列出如下清单: arm-uwp arm-windows arm64-uwp arm64-windows x64-uwp x64-windows-staticx64-windows ...