
C++ is a statically-typed general-purpose language middle-level programming language and superset of the C programming language used everywhere but...
For further actions, you may consider blocking this person and/or reporting abuse
I copy-pasted the Makefile content but when running make I was getting the error "mising separator. Stop".
I fixed adding a tab instead of spaces in lines 15, 16, 19 and 22:
run: clean all
[tab]clear
[tab]./$(BIN)/$(EXECUTABLE)
$(BIN)/$(EXECUTABLE): $(SRC)/*.cpp
[tab]$(CXX) $(CXX_FLAGS) -I$(INCLUDE) $^ -o $@ $(LIBRARIES)
clean:
[tab]-rm $(BIN)/*
Note: It woud be nice if the main.cpp file could be put in the root of the project folder, outside of src.
Great post by the way. I spent hours trying to compile in VS Code a multi file project before I seeing this.
Thanks!.
I'm glad you found a work-around, I copy-pasted the makefile from my project, so maybe tabs were removed.
If you want main.cpp in your root directory of your project. try this.
Thank you, I'm glad it helped.
I did the setup as mentioned but I keep getting the following error
Its' not for windows.
for me it always says:
make: The term "make" was not recognized as the name of a cmdlet, function, script file, or executable program. Check the spelling of the name or whether the path is correct (if included),
and repeat the process.
In line: 1 character: 1
You are using windows? or maybe PowerShell Core on Linux?
You need to install
make
on your System and you won't get error again.Thank you so much for this guide!
For anyone struggling with intellisense errors, just add a file called
c_cpp_properties.json
in.vscode/
with the following contents:Great guide!
But when setting up the ProblemMatcher, should it be added after the group {}, or as a field of the group
Thank you!
After the group, like this.
Thanks! Actually VSCodium complains if you do it wrongly, but thanks for taking the time! 😁
Really helpful, well said! One thing though
I notice there is a missing ',' in the tasks.json file needed after "command": "make"
Thank you. I'm glad that it helped.
Yeah I did a mistake, I'll fix it now.
Thank you Talha, it helped a lot !
Just one typo: "and voilà !"
("viola" means "raped" in French 😉)
You welcome. I'm glad it helped.
Sorry for the typo, I had no idea. I'll fix it right away.