# cpp_sample **Repository Path**: phenixcode/cpp_sample ## Basic Information - **Project Name**: cpp_sample - **Description**: No description available - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-23 - **Last Updated**: 2026-05-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 1. cmake, vscode c++ 环境配置参考: https://blog.csdn.net/2503_90093283/article/details/145139727 2. 文件夹下包含多个c++ 项目文件夹,如何切换不同项目调试? * 创建一个顶级的 CMakeLists.txt,包含所有项目 * 修改 [.vscode/settings.json](https://file+.vscode-resource.vscode-cdn.net/Users/lny/Repository_git/third_party/cpp_sample/javascript:void(0)) 指向根目录: * 后在 VSCode 的 CMake 插件中,你可以通过以下方式切换目标:* 使用命令面板 (`Cmd+Shift+P`) 运行 "CMake: Set Launch/Debug Target" 3. 如何build * 创建build 文件夹,作为输出文件夹 * 在buld文件夹中运行cmake .. (CMakeLists.txt所在文件夹) 命令生成makefile文件, 目录下就生成了这些文件-CMakeFiles, CMakeCache.txt, cmake_install.cmake 等文件,并且生成了Makefile. * 在build文件夹中使用make 命令编译