I am having some troubles compiling c++ programs in VS code. I followed this answer: How do I set up Visual Studio Code to compile C++ code?
and my Makefile is
CC=g++
CFLAGS=-Wall
.SUFFIXES = .cpp
objs:=$(wildcard *.cpp)
targets:=$(objs:.cpp= )
.PHONY:all
all: $(targets)
.cpp:
$(CC) $(CFLAGS) -std=c++11 -o $@ $<
I just want to compile this file which is opened in current window, say 1.cpp and this file does not have any external dependencies
When i try to compile my file (by pressing f8 as given in the answer i linked) i get the following error:
'make' is not recognized as an internal or external command,
operable program or batch file.
I am a beginner, and don't know much about Makefile , any help will be appreciated.
Thanks!
Edit:
I am using Windows subsystem for linux to compile my programs not mingw or cygwin.
Edit:
Now i can use make but i think something is wrong with my Makefile.