How to link compiler with the IDE?

Hi ,
What i was thinking was that if we added tge compiler into the server files and added this code runner extension would that work?
Like add a C++ compiler Mingw and add the Code runner extension
This should work I guess but linking the compiler by default with the langiage is something I am confused with. Obviously we could do it manually .