编译静态(动态)库 sqlcipher-4.6.1 既 sqlcipher.lib的方法(包含静态库版本的openssl,tcl)
编译静态(动态)库 sqlcipher-4.6.1 既 sqlcipher.lib的方法(包含静态库版本的openssl,tcl)
环境
我的环境:Windows 10,Visual Studio 2022,vcpkg version:2025-09-03没有vcpkg就需要安装

1. 创建项目
- 随便创建一个项目,如:build_sqlcipher
- 在项目根目录创建
vcpkg.json
{
"name": "openssl-sqlcipher-static",
"version-string": "1.0.0",
"dependencies": [
"openssl",
"sqlcipher"
]
}
2. 项目根目录依次执行命令
# 请确保能正常访问 github
vcpkg integrate install
vcpkg x-update-baseline --add-initial-baseline # 旧版本的 vcpkg 或许不用执行这个
# vcpkg install # 动态库
vcpkg install --triplet x64-windows-static # 静态库
3. 项目根目录执行命令
vcpkg list --triplet x64-windows-static
执行后如图:

4. 编译文件位置
执行完上述命令,你将得到以下文件,其中包含静态库版本openssl与sqlcipher
|-- vcpkg_installed
|-- x64-windows-static
|-- include
|-- openssl
|-- sqlcipher
|-- lib
|-- libcrypto.lib
|-- libssl.lib
|-- sqlcipher.lib
本文来自博客园作者:星尘的博客,转载请注明出处:https://www.cnblogs.com/yqbaowo/p/19147361

浙公网安备 33010602011771号