c++ – How to screw MinGW to Sublime Text 2?


Good evening!

Can anyone share their experience on how to screw mingw to Sublime ?

Found some kind of config on the internet, but when the compiled program starts, errors pop up with missing files from the "../MinGW/bin/" folder.

Here, in fact, is the config itself:

     "cmd": ["mingw32-g++.exe", "-o", "$file_base_name", "$file_name"],
     "path": "c:\\Program Files\\MinGW\\bin\\"


Moved from the question, the author answered on his own:

I found the answer to my question! I just needed to add one parameter to cmd. This is the "-static" parameter.

So here's my MinGW.sublime-build that works great:

    "path": "c:\\Program Files\\MinGW\\bin\\",
    "cmd": ["mingw32-g++.exe", "-static", "-o", "$file_base_name", "$file"]
Scroll to Top