https://github.com/sjoerdev/cpp-guide-toolchain
https://github.com/sjoerdev/cpp-guide-toolchain
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sjoerdev/cpp-guide-toolchain
- Owner: sjoerdev
- Created: 2025-01-26T18:01:29.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-26T18:20:55.000Z (4 months ago)
- Last Synced: 2025-02-01T23:46:06.359Z (4 months ago)
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Setup Compilers
**MSVC:**
1. Download the [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
2. Select the ``Desktop development with C++`` workload
3. Select the ``MSVC Build Tools`` and the ``Windows SDK``**Clang:**
1. Go to the [llvm downloads](https://github.com/llvm/llvm-project/releases) on github
2. Download the ``LLVM-X.X.X-win64.exe`` windows installer file
3. Run the installer and choose ``Add LLVM to the system PATH for all users`` when prompted## Setup Build Systems
**XMake:**
1. Run ``winget install xmake`` in the terminal
2. Check installation with ``xmake --version`` in the terminal**Cmake:**
1. Run ``winget install cmake`` in the terminal
2. Check installation with ``cmake --verion`` in the terminal## Setup Visual Studio Code
**C++ Extension:**
1. Install the [Microsoft C++ Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) for vscode
**XMake Compile Commands:**
1. Generate ``.vscode/compile_commands.json`` by running ``xmake project -k compile_commands .vscode``
2. For automatic updates add this line to your xmake file ``add_rules("plugin.compile_commands.autoupdate", { outputdir = ".vscode" })``
3. Now add the ``.vscode/compile_commands.json`` to your ``.gitignore`` file
4. Create a file called ``.vscode/c_cpp_properties.json`` with this json:
```json
{
"version": 4,
"configurations":
[
{
"name": "build_compile_commands",
"compileCommands": ".vscode/compile_commands.json"
}
]
}
```