The DLL libraries you added (libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll) to the exe directory must come from the same compiler used to compile your program. Do not download random DLL from Internet or use the first one found in your computer.
C is not picky about mixing DLL from different sources, but C++ is because of name mangling.