Description of the problem:
vscode uses the win32 version of the compilation library to compile the cpp program, prompting that std has no mutex and reports an error
Solution: download and configure the MinGW compiler
- Replace the MingW compilation library
MingW official website download
Download the compressed package—×86_64-posix-sjlj (recommended). Posix is better for cross-platform compilation. I am doing vscode+cmake environment configuration under win10. 2.
Configure the vscode compilation environment
c_cpp_properties.json
launch.json
tasks.json
Perfect solution;