I am working in C++ for the first time and running into issues compiling multiple files. The issue appears to be related to the compiler being unable to find the libstdc++-6.dll file even though it is present in the minGW bin directory which is linked to in PATH. I am looking for help identifying why.

I wrote a basic main function that has both cout and cin, which compiles and runs as expected. However, when I add an additional basic class header file and an implementation file as well as add `#include "className.h"` at the top of the file with the main function, it behaves badly. When I Run Build Task, it builds an exe, but does not call either the cout or cin. If I then run the .exe on the external command prompt I get the following error:

[![enter image description here](https://i.stack.imgur.com/LxUCn.png)](https://i.stack.imgur.com/LxUCn.png)

I found several SO threads where this problem was solved by moving the libstdc++-6.dll into the directory containing the .exe. I copied and pasted the file from the minGW bin directory and that works. However, I would expect the compiler to find this file by itself and am wondering if there is some obvious reason why it would not find it.

I have several peers who followed the exact steps I did and their systems are picking up this file, so it seems it must be something that is misconfigured on mine. The .h and .cpp files I added have been thoroughly tested on other systems and are not the problem.

(I am using a PC with a windows 10 operating system, minGW 8.0.0, and VSCode 1.49.3, the last two were freshly installed today)