#Mingw tutorial code#
Next, we configure VS Code so that Press F5 to start GCC Debugger (GDB.exe). This attribute is for convenience, if you set it into false, you have to enter Run Build Task from the command palette. It indicates that this task will run when the shortcut key Ctrl + Shift + B is pressed. You can name it according to your own preference. The value of Label is you can see in the VS Code command tuning disk (Command Palette).
These parameters are transmitted to G ++ in the order in the array. The Args array indicates the command line parameter to pass to G ++. "args": ,Ĭommand items indicate the program to run here is G ++. If you open this file directly, it looks almost like this. When your programs include neither from your work space, you just want to modify the include Path settings when you don't come from the standard library path. This information is called intelligent perception (IntelliSense). When the plugin knows where these files are, it will provide many useful information when you write the code. The plugin uses it to infer the location of the C ++ standard library header file. The setting of the Compiler Path is very important. If you have different options when you install, the path will also be different. If you have installed VS or WSL, you have to change it here, if you installed the 8.1.0 version of the MingW-W64 installed in the C: / MingW-W64 directory, use the Win32 thread and SEH exception, then the path will look like this.
#Mingw tutorial windows#
It first looks for the MSVC compiler, then finds G ++ in Windows Linux Subsystem (WSL), and then the MINGW-W64 G ++. Find the Compiler path, VS Code will try to fill in a default compiler based on your system. The c_cpp_properties.json file under the VSCode folder.ģ. You are making changes here, VS CODE will write them into. This opens the C / C ++ IntelliSense Configurations page. Enter "C / C ++" and select Edit Configurations (UI) in the drop-down table. Press Ctrl + Shift + P to open the command palette (Command Palette), it looks like this:Ģ.
The command will open VS Code in the current directory and use this directory as your workspace. The command of this process is as follows: Create a subfolder to name HelloWorld, enter this folder, then open VS Code. Turn off the console window because the new path is not available in this window.Ĭreate a new folder in a new DOS command prompt to name Projects, where you are stored here.
In the command line, use setx to add the BIN path of the MINGW-W64 to the system path, the actual path depends on the version and location of the MingW-W64 you install.Type "CMD" in the Windows Search Bank, then select a command prompt.Add the bin folder in MINGW-W64 to Windows Path Environmental Variables.In this tutorial, we assume that it is installed in C: \ MingW-W64.