If you are running Windows you can install Microsoft's compiler. If you are in a UNIX environment that will likely be gcc or clang, they can be installed from the package manager of your system. To follow this guide you will need a C++ compiler suite and git. Don't hesitate to contact me if you find issues so that I can update this guide. You should be able to follow without facing OS specific issues, but we never know. Note: I'm currently using Windows 10 as my main operating system, everything I document here has also been tested on Linux via WSL, and should work as well on macOS. Configure Visual Studio Code so that we can control our builds and tests directly from the editor, and have autocompletion for dependencies installed via vcpkg.Use CMake to manage our builds and run our tests.Setup and use vcpkg to download, build, and install open source dependencies such as catch2 (for our tests), and fmt (for our code).Tools popularity can vary quite a lot from years to years, for example solutions to manage dependencies are still competing against each other and new ones are popping all the time, so I want to be clear that this document is my setup in 2020, hopefully it will stay evergreen in the future, but I wouldn't bet too much on it. At the end of this guide we will be able to build and run tests in just one click (or command line if that's your thing). Because so much choices can be daunting for people who just want to start with the language, and because I know I will forget how things work, in this article I will document what I've done to get to a fully working environment that answers all my questions in a simple and coherent way. The C++ world is way more fragmented, there is a lot of choices of build and meta build tools, various test frameworks (each with its own test runner), lot of way to manage dependencies, etc. But of course in the case of C++, things are. , go get, install the official Go extension for your editor. Some languages such as Go come with simple answers to these questions: go build. How do I integrate all of this in my text editor?.When I start to use a programming language I always have the following questions:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |