Suggest: 1) CFLAGS:= -Wall -Wextra -Wconversion -pedantic -std=C11` (and place -c and $(CFLAGS) in the compile rule) and to avoid problems with #include files, generate a rule that creates the dependency files and include them at the bottom of the makefile. And modify the compile rule to include the dependency file that is related to the file being compiled. – user3629249 Jun 8 '20 at 20:17. Follow these steps to configure makefile projects so that IntelliSense works as expected: Open the Property Pages dialog box. For details, see Set C compiler and build properties in Visual Studio. Expand the Configuration Properties node. Select the NMake property page, and then modify properties.
Settings OptionsThis extension contributes the following variables to the settings:
FeaturesCommands viewA view to visualize and explore Makefile commands Explorer menuAdds 'Run test' and 'Run and watch test' in the explorer menu
How to use
|
Source Code can be found at github.
Visual Studio Code (VSCode) is a source-code editor developed by Microsoft for Windows, Linux and macOS.[7] It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring.
GCC and make
Makefile In Visual Studio
We are going to use gcc, make and a makefile.
Preparation
In Windows you need to install msys2. Ensure that the PATH
environment variable is updated and contains the msys2 paths, as noted in the mentioned post.
In CentOS Linux now, if you don’t have gcc, you’ll find plenty of information on internet on how to install it. To just ensure you already have gcc and make installed type the following in a terminal.
VSCode *.json setting files
Generate Makefile Visual Studio Code
VSCode keeps *.json setting files in the .vscode
folder.
Here is the launch.json
file.
Visual Studio Code Makefile Support
Here is the tasks.json
file.
And here is the c_cpp_properties.json
file.
Makefile
The makefile
is used in compiling and cleaning the project.
You may call the makefile directly using the VSCode terminal, provided that you are in the root directory of the project.
Vscode Makefile Gcc
Visual Studio Code Makefile Project
Good luck.