# How to tie MinGW to Sublime Text 2?

Good evening!

Can anyone share the experience of how to tie `mingw` to `Sublime` ?

Found some config in the internet, but when you run the compiled program, errors with missing files from the folder "../MinGW/bin/" pop up.

Here is the config itself:

` `{ "cmd": ["mingw32-g++.exe", "-o", "\$file_base_name", "\$file_name"], "path": "c:\\Program Files\\MinGW\\bin\\" }` `
• I noticed something ... If you place the compiled file in the "../MinGW/bin/" directory, then everything starts fine and works. I understand that the solution to the problem lies in the face, but I cannot reach the solution myself. - Sam Abdullaev
• And if you set the `path` to your folder with the collected binaries in the `path` ? - VioLet
• It leads to nothing. With this config, an error occurs with missing files. "cmd": ["c: \\ Program Files \\ MinGW \\ bin \\ mingw32-g ++. exe", "-o", "\$ file_base_name", "\$ file_name"], "path": "c: \\ helloworld \\ "Nothing happens at all:" cmd ": [" mingw32-g ++. exe "," -o "," \$ file_base_name "," \$ file_name "]," path ":" c: \ \ helloworld \\ " - Sam Abdullaev
• You have just statically linked `libgcc` and `libstdc++` to your `exe` 'snik. Given the problems that static linking of runtimes can potentially lead to, I doubt very much that this is a good solution. - Costantino Rupert
• For my level, I think this is not important for now. But still interesting .. And to what problems this may lead in the future? - Sam Abdullaev

I found the answer to my question! I just had to add one parameter to cmd. This is the `"-static"` parameter.
So, here is my `MinGW.sublime-build` , which works great:
` `{ "path": "c:\\Program Files\\MinGW\\bin\\", "cmd": ["mingw32-g++.exe", "-static", "-o", "\$file_base_name", "\$file"] }` `