Skip to content

A build tool/ready to use workspace configuration for C/C++

Notifications You must be signed in to change notification settings

kalpaj12/VS-Code-Builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 

Repository files navigation

VS-Code-Builder for Windows, Linux and Mac

Screenshot of the workspace folder Screenshot

Requirements for Windows

MinGW. Download from here

Requirements for Linux

g++ (sudo apt install g++)

Requirements for Mac

g++ (g++)

Instructions for Windows

  1. Download MinGW.zip from the above link and extract it to your local disk C:

Note: Set C:\MinGW\bin as path under environment variables.

  1. Copy .vscode from this repo and paste it inside the folder where your C/C++ codes are present. Open this folder as workspace in vscode.

  2. Open any C/C++ file, hit ctrl+shift+b and select Create Files. This should create 2 files(Input.txt and Output.txt) in the root of the workspace folder. Note that this is a one time step.

  3. In the Input.txt file, provide your inputs.

  4. To build and run, use the keyboard shortcut command ctrl+shift+b and select C++ builder.

The output of the code corresponding to the inputs are saved in the Output.txt.

Instructions for Linux

  1. After installing g++, copy .vscode from this repo and paste it inside the folder where your C/C++ codes are present. Open this folder as workspace in vscode.

  2. Open any C/C++ file, hit ctrl+shift+b and select Create Files. This should create 2 files(Input.txt and Output.txt) in the root of the workspace folder. Note that this is a one time step.

  3. In the Input.txt file, provide your inputs.

  4. To build and run, use the keyboard shortcut command ctrl+shift+b and select C++ builder.

The output of the code corresponding to the inputs are saved in the Output.txt.

Instructions for Mac

  1. To install g++, install Xcode first. Xcode menu > Preferences > Downloads > choose "Command line tools" > Click "Install" button. Alternatively, run g++ on terminal and follow instructions.

  2. Edit c_cpp_properties.json file (under .vscode) and correct your OSX version (if necessary) under

"macFrameworkPath": [ "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks" ],

  1. Copy .vscode from this repo and paste it inside the folder where your C/C++ codes are present. Open this folder as workspace in vscode.

  2. Open any C/C++ file, hit ctrl+shift+b and select Create Files. This should create 2 files(Input.txt and Output.txt) in the root of the workspace folder. Note that this is a one time step.

  3. In the Input.txt file, provide your inputs.

  4. To build and run, use the keyboard shortcut command shift+command+b and select C++ builder.

The output of the code corresponding to the inputs are saved in the Output.txt.

Reviews are appriciated and can be submitted here.

Releases

No releases published

Packages

No packages published