鉴于官网写得过于复杂,实际使用 vcpkg 安装十分简单。 以下在Windows下进行,需要Visual Studio环境,CLion暂时无法编译。

全局集成 vcpkg

POWERSHELL
vcpkg integrate install
点击展开查看更多

安装

POWERSHELL
vcpkg install jsoncpp:x64-windows zlib:x64-windows openssl:x64-windows sqlite3:x64-windows libpq:x64-windows libpqxx:x64-windows libmariadb:x64-windows drogon[core,ctl,sqlite3,postgres,mysql,orm]:x64-windows
点击展开查看更多

创建项目

添加环境变量

POWERSHELL
$env:PATH="$env:VCPKG_ROOT\packages\drogon_x64-windows\tools\drogon;$env:PATH"
点击展开查看更多

创建项目

POWERSHELL
drogon_ctl create project <project_name>
点击展开查看更多

版权声明

作者: Chaim

链接: https://chaim.eu.org/posts/%E4%BD%BF%E7%94%A8-vcpkg-%E5%AE%89%E8%A3%85-drogon/

许可证: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

开始搜索

输入关键词搜索文章内容

↑↓
ESC
⌘K 快捷键