{"id":15397545,"url":"https://github.com/christiankuehnel/cpp-on-win","last_synced_at":"2026-04-17T15:01:53.759Z","repository":{"id":93828596,"uuid":"321290792","full_name":"ChristianKuehnel/cpp-on-win","owner":"ChristianKuehnel","description":"Tutorial for developing C++ on Windows using open source tools.","archived":false,"fork":false,"pushed_at":"2020-12-17T15:57:36.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T00:18:58.550Z","etag":null,"topics":["clang","clangd","cmake","cpp","cxx","ninja","vscode","windows"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChristianKuehnel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-14T09:05:06.000Z","updated_at":"2020-12-17T15:57:38.000Z","dependencies_parsed_at":"2023-03-21T01:02:16.210Z","dependency_job_id":null,"html_url":"https://github.com/ChristianKuehnel/cpp-on-win","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"3a5ab285cce277cf5fb3adf4510ed1d819152a48"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ChristianKuehnel/cpp-on-win","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianKuehnel%2Fcpp-on-win","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianKuehnel%2Fcpp-on-win/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianKuehnel%2Fcpp-on-win/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianKuehnel%2Fcpp-on-win/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChristianKuehnel","download_url":"https://codeload.github.com/ChristianKuehnel/cpp-on-win/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianKuehnel%2Fcpp-on-win/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265871876,"owners_count":23842091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clang","clangd","cmake","cpp","cxx","ninja","vscode","windows"],"created_at":"2024-10-01T15:38:21.039Z","updated_at":"2026-04-17T15:01:53.615Z","avatar_url":"https://github.com/ChristianKuehnel.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Developing C++ on Windows \n\nThis tutorial will walk you through installing and configuring widely used\nC++ development tools on Windows.\n\n## Tool Overview\nWe will be using these tools as they are widely used in open source development:\n* [Cmake](https://cmake.org/) - as build management system\n* [Ninja](https://ninja-build.org/) - as build system actually doing the building\n* [LLVM](http://llvm.org/) - as compiler (clang) , linker (lld), debugger (lldb), \n  language server (clangd)\n* [git](https://git-scm.com/) - as version control tool (e.g. to work on Github)\n\nWhile not really required, I would recommend using an integrated development \nenvironment. IMHO this makes using all these tools much easier. In this tutorial,\nwe'll be using [Visual Studio Code](https://code.visualstudio.com/) from Microsoft (short VSCode). \nWhile not 100% open source, it has hughe ecosystem of extensions available and \nalso works across many operating systems and languages.\n\n## Installation\nTo make installation as easy as possible, we'll be using \n[Chocolately](https://chocolatey.org/) as package manager to install the tools \nwe need: \n\n1. Install chocolately using admin rights follinging these instructions: \n   https://chocolatey.org/install\n\n1. In a Powershell *with admin rights* run:\n```choco install -y cmake ninja llvm git vscode git```\nto install the tools we will need, the argument `-y` tells it to assume `yes`\non all questions during the installation. \n\nThat's it.\n\n\n## Configuring VSCode\nNow that we have all the tools installed, we need to configure them. We will do\nthis by configuring a first project to see if everything is working.\n\n1. Start Visual Studio Code and install these extensions:\n   * [clangd](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd), \n     the C++ language server from LLVM.\n   * [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools), \n     to configure the builds from within VSCode\n1. Disable the C++ Intellisense extension, it will interfere with clangd. \n  If there is a pop-up, decline it, even if VSCode keeps asking you over and \n  over again. We'll be using `clangd` instead.\n1. On the \"Welcome\" screen of Vistual Studio Code select \"clone repository...\" \n  and enter `https://github.com/jameskbride/cmake-hello-world` as URL. Then pick\n  a local folder where you want to store that project.\n1. Allow Cmake to configure the project. When asked to select a \"Kit\" choose \n   \"Clang\". This will select clang \u0026 Co as your toolchain for this project.\n1. To run something in VSCode, hit `\u003cCTRL\u003e + \u003cSHITFT\u003e + \u003cp\u003e`. This will open the \n   \"Command Palette\". Use the Command Palette to run the followingn commands:\n   1. Run `\u003e CMake: configure` to configure the build environment. The Terminal \n      will show you the log output of the CMake commands. If you see \n      `Generating done` in the log, the configure step was successful.\n   1. Run `\u003e Cmake: build` (or hit `\u003cF7\u003e`) to build the project. Again you will see\n      the log output of the compilation in the Terminal. If your system is be using\n      Ninja as builder, `The build completed with exitcode 0.` means that the build\n      was successful.\n   1. Run `\u003e CMake: run without Debugging` (or hit `\u003cshift\u003e + \u003cF5\u003e`). This will run\n      your program in the Terminal and show you the console output. If you see the\n      output `Hello, world!` your program was run successfully.\n\nThat's it. You just downloaded a project from Github, configured CMake, compiled\nand linked the project and were able to run the resulting program.\n\n## Running the debugger\n\n1. Install the \n[CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) \nextension from the marketplace.\n1. Configure the target you want to debug:\n```json\n{\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"type\": \"lldb\",\n            \"request\": \"launch\",\n            \"name\": \"Debug\",\n            \"program\": \"${workspaceFolder}/build/\u003cyour executable\u003e\",\n            \"args\": [],\n            \"cwd\": \"${workspaceFolder}\"\n        }\n    ]\n}\n```\n1. Start the debugger with `\u003cF5\u003e`. When asked which \"environment\" to use\n   select `LLDB` from the list.\n\nThat's it, now you can debug your C++ project in VSCode. More information on\ndebugging in VSCode can be found in the \n[manual](https://code.visualstudio.com/docs/editor/debugging).\n\n## TODO: Unit testing \nusing GTest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiankuehnel%2Fcpp-on-win","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristiankuehnel%2Fcpp-on-win","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiankuehnel%2Fcpp-on-win/lists"}