Create a new terminal using the + button and you'll have a new terminal with the helloworld folder as the working directory.To run the build task that you defined in tasks.json, press ⇧⌘B or from the Terminal main menu choose Run Build Task.Because we want to build helloworld.cpp it is important that this file be the one that is active in the editor for the next step. My tasks.json for example looks like this (I used g++) " This will create a tasks.json file in the. Choose C/C++ clang++ build active file (or g++ if you want to build with gcc) to build the file that is currently displayed (active) in the editor. A dropdown will appear listing various predefined build tasks for the compilers that VS Code found on your machine. From the main menu, choose Terminal > Configure Default Build Task.It's important to have helloworld.cpp open in the editor because the next step uses the active file in the editor as context to create the build task in the next step. This task will invoke the Clang C++ (or g++ if you want to build with gcc) compiler to create an executable file from the source code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |