
But first, I need to locate where msys-2.0.dll is, so I use the following code to do it: if(MSYS) In order to simulate the POSIX shell, I copy the msys-2.0.dll to the output bin directory. Then, add MSYS Makefiles as the preferredGenerator for the kit GCC 10.2.0 x86_64-pc-msys, like this: "name": "GCC 10.2.0 x86_64-pc-msys", Input CMake: Edit User-Local CMake Kits in Command Palette to open cmake-tools-kits.json. Open VSCode and input CMake: Scan for Kits in Command Palette, and then choose the GCC 10.2.0 x86_64-pc-msys. pacman -S msys2-develĪfter installing msys2-devel, I add the directory of compiler, C:\msys64\usr\bin, to the environment variable, PATH, so that CMake-Tools can scan for this kit. Use pacman to install the toolchain of MSYS, msys2-devel. Steps of Building Environment for MSYSĭownload the MSYS2 installer from its website, and follow the instructions listed on the home page to synchronize databases. But it looks like it cannot work well on MSYS environment. That is awesome, by the way, because I don’t have to worry about intellisense of C/C++. Usually, I don’t use c_cpp_properties.json because CMake-Tools will help me to to intellisense whether I work in Windows or Linux, thanks to the ms-vscode.cmake-tools. Squiggles are disabled for this translation unit

#include errors detected based on information provided by the configurationProvider setting. However, the intellisence of CMake-Tools shows that it could not locate the headers with the squiggles underneath.

I wrote a simple program with fork(), and it could run successfully.
#Cygwin cmake command not found how to#
Recently, I’ve done the research on how to build the environment of MSYS in VSCode.
