vscode prompts namespace “std” has no member “mutex” solution

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

  1. Replace the MingW compilation library
    MingW official website download
    insert image description here

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
insert image description here
launch.json
insert image description here
tasks.json
insert image description here
Perfect solution;

Guess you like

Origin blog.csdn.net/krislong/article/details/128150689