Sublime Text 2 and MinGW

后端 未结 2 854
既然无缘
既然无缘 2021-02-09 19:53

Good day!

Can anyone share their experience how to attach MinGW-compiler to Sublime?

I found a config in the internet, but when I run compiled program popping bu

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-09 20:19

    You should be using $file instead of $file_name. $file_name expands to only the name whereas $file expands to the full path.

    The changed config would be

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

提交回复
热议问题