0

I've just installed Visual Studio Code v1.7.1 to write my c++ code in for my degree. My programming level is pretty basic, but I like what I've seen of VS Code so far, save for the fact that I've no idea how to debug or build my code.

I've looked at a few questions on the topic, such as: How do I set up VSCode to compile C++ code? and have tried implementing some of these into the tasks.json file, including the make command and the g++ command, but when I try and execute it I get the error:

'make' is not recognized as an internal or external command, operable program or batch file.

or something similar. When I try running the debugger, it tells me to set up the launch.json file, so I entered the path of my file where it says 'program' as the instructions imply, I get the error

Unknown Error: 0x800700c1

I'm just looking for the simplest option that will allow me to write and debug code in vs code, in a manner similar to using the full version of visual studio, but without the heavy project filing system or the 10 minute loading times. Any help would be greatly appreciated.

8
  • Have you read the manual pages. Perhaps one of the menu options compiles the code )CTRLF9 as I recall but could be wrong) Commented Nov 19, 2016 at 15:13
  • 1
    Are you sure you even have a compiler installed? Afaik Visual Studio Code is just an editor. Commented Nov 19, 2016 at 15:16
  • Looks like you're missing make. It is typically packaged separately from gcc. What OS and tool chain are you using? Commented Nov 19, 2016 at 15:20
  • Yeah that's the thing, I figured I need something like that but I've no idea what or how - I tried searching for an answer but my knowledge was far too limited to come up with a search term like compiler. Commented Nov 19, 2016 at 15:21
  • So are you running on Windows or Linux? Have you ever compiled code on your machine before? Commented Nov 19, 2016 at 15:22

1 Answer 1

1

What I deduce from your question and the comments is that you have no actual C++ compiler/buildchain installed. There are multiple compilers available (like minGW, GCC).

However, what Microsoft recommends is the following:

Installing C/C++ build tools

To obtain your set of C/C++ compilers on Windows you can grab the Visual C++ build tools SKU. By default these tools are installed at ‘C:\Program Files (x86)\Microsoft Visual C++ Build Tools’.

I have not tested, nor ever worked with the Visual C++ compiler, but it's probably the easiest way to get started right away.

Sign up to request clarification or add additional context in comments.

1 Comment

I had the same issue as OP, the solution in this answer solved it. +1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.