Visual Studio Code

RAHIT

Estimable
Jul 19, 2014
3
0
4,510
0
I want to do some C programming on visual studio code. What things I need to set up on VS code so that I can do C programming. A task.json file I found on the internet was like this:
{
"version": "0.1.0",
"command": "g++",
"isShellCommand": true,
"showOutput": "always",
"args": ["-g", "main.cpp"]
}
How should my task.json file look like for C programming?
 

shrapnel_indie

Distinguished
Jan 21, 2010
67
0
18,610
8
Since C is a subset of C++, you shouldn't need to do anything else other than change "main.cpp" to "main.c." Other than that, set up Visual Studio Code for using C++. It uses pretty much the same compiler (in this case g++) regardless. Just be aware that as of 9/7/2016, C++ support is still under development and therefore, by extension, so is C support. You may run into some glitches here and there.
 
Visual Studio Code is NOT an IDE, it's just a text editor. You are still supposed to have compiler toolchain installed on your computer in order to produce it.

For the moment - get some easy-to-use IDE, the one I'm using is CodeBlocks (available in most current Linux distro's). You will still have to install gcc and c++, but the IDE wlll let you compile and debug without leaving it.
 

shrapnel_indie

Distinguished
Jan 21, 2010
67
0
18,610
8


I will agree with the Code::Blocks suggestion. It is a full IDE and cross-platform. It capable of using any one of multiple compilers (MinGW, G++ are two cross-platform compilers. On Windows it can use the VS compilers, or even Borland Compilers in addition to those two. I believe it supports more than that on all platforms too.) PLUS Code::Blocks resides on your computer, not in the cloud, so if you are having internet issues, it will not suffer.

 
Thread starter Similar threads Forum Replies Date
A Apps General Discussion 5
2 Apps General Discussion 1
A Apps General Discussion 1
T Apps General Discussion 1
J Apps General Discussion 4
D Apps General Discussion 2
arpitsri Apps General Discussion 3
A Apps General Discussion 5
M Apps General Discussion 4
F Apps General Discussion 1
W Apps General Discussion 4
M Apps General Discussion 4
M Apps General Discussion 2
S Apps General Discussion 4
P Apps General Discussion 2
drjackool Apps General Discussion 1
M Apps General Discussion 4
V Apps General Discussion 4
I Apps General Discussion 2
H Apps General Discussion 6

Similar threads


ASK THE COMMUNITY