'Can't use command make for makefile on Visual Studio Code
Backround
I have been coding (mostly C) on Linux so far but i want to be able to code on Windows as well. So i searched for a better editor than notepad and found Visual Studio Code that has extensions to make your life easier.
Problem
I wanted to use a makefile
with the command make
for more complex compilations of my .c files, but it doesn't seem to recognize the command make
no matter what extensions i tried for Visual Studio Code nor from the embeded terminal.
Extensions Tried
Solution 1:[1]
Firstly, I would ensure that make is installed on your system.
Secondly, if make is installed, make sure you are operating from the correct directory. If you open a terminal using Terminal > New Terminal and type in make, does it work. If so then you may just need to create a simple task that runs on an F5 press or whatever OR just type make in to build every time.
If make doesn't work, make sure you are using the directory containing the makefile as your WD or otherwise cd or set your settings in those extensions to use a subdir as the root.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | TTG |