# cpp-vcpkg-hello-world **Repository Path**: eric-tutorial/vcpkg-hello-world ## Basic Information - **Project Name**: cpp-vcpkg-hello-world - **Description**: vcpkg的官方helloworld教程实现 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: https://learn.microsoft.com/zh-cn/vcpkg/get_started/get-started?pivots=shell-bash - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-04 - **Last Updated**: 2025-06-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README vcpkg的helloword起步 === https://learn.microsoft.com/zh-cn/vcpkg/get_started/get-started?pivots=shell-bash # vcpkg https://vcpkg.io/ https://github.com/microsoft/vcpkg https://learn.microsoft.com/zh-cn/vcpkg/ # 创建项目 ```shell mkdir helloworld && cd helloworld ``` ```shell vcpkg new --application ``` ```shell vcpkg add port fmt vcpkg add port jsoncpp ``` vcpkg.json 这个文件纯粹就是为了管理 vcpkg 的依赖。与cmake是两个独立的,但是也需要配合的两个组件。 # 纯命令行跑起来 预处理 ``` https_proxy='http://localhost:20171' cmake --preset=default ``` 构建 ``` cmake --build build ``` 执行 ``` ./build/HelloWorld ``` ![alt text](image.png) # Clion运行 ```shell -DCMAKE_TOOLCHAIN_FILE=/Users/HOX4SGH/Project/CPP/vcpkg/scripts/buildsystems/vcpkg.cmake ``` ![img.png](img.png) ![img_1.png](img_1.png)