Here is the resulting file: /a.out”.Īfter that in the Explorer tree you should see HELLOCODE folder with a subfolder. ![]() Notice that Visual Studio Code has intelligent editor and will help you along the way. Change ‘label’ to “build (debug)”, change ‘command’ to “g++”, and we need add two new parameters: ‘args’ and ‘group’. tasks.json file will be created with some default content, let’s edit it. Select “Create tasks.json file from template” and select “Others”. Press Ctrl+Shift+P to open command tool and start typing task, then in drop down list select “Tasks: Configure Default Build Task”. Next we need configure build task and debug task. You will notice that in our project tree on the left side new folder appeared and inside new file were created: c_cpp_properties.json – this is our project configuration files.īut we are not done yet with configuration. Make sure that Compiler Path is not empty (if it is you need to install build package) Press Ctrl+Shift+P to open command tool and start typing c++, then in drop down list select “C/C++: Edit Configuration(UI)”. On the left side switch back to Explorer view. Next thing we need to do is configure VS Code to be our C++ IDE. We don’t need it right now, but since we are here let’s install extension for CMake – type cmake in Search Marketplace box and install CMake Tools and CMake Tools Helper. Select C/C++ extension from Microsoft and click Install. On the left side click Extensions and then type C++ in Search Marketplace box. Visual Studio Code application should start and in the Explorer tree it should point to newly create folder. We will create directory for our first project and start VS Code in it: mkdir hellocode & cd hellocode Next thing we’ll need to prime it for C++ development. Installation is very simple, just follow instructions on Microsoft page, or use OS GUI tool (such as Ubuntu Software) to install it. ![]() Please note that VS Code is an editor, it does not have build environment, so for any language you want it to use you will have to install build environment separately: sudo apt-get install -y build-essential git cmake. ![]() On Linux I don’t have enough experience to make decision yet.įor small projects Microsoft Visual Studio Code looks promising. On Windows nothing could beat Microsoft Visual Studio (in my opinion). To be a productive developer good editor/IDE is essential.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |