gcc - Could someone help me configure MinGW in SublimeText 3? (Newbie) -


i downloaded mingw following first link here https://isocpp.org/get-started , need configure in subimetext 3. know should go tools > build system > new build system... should specify there?

i use win7x64. , mingw in c:\mingw

the complete reference build systems here. first thing need make sure c:\mingw\bin directory in path, restart sublime change gets picked up.

once you've done that, create new build system following contents:

{     "cmd": ["gcc", "${file}", "-o", "${file_base_name}.exe"],     "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",     "working_dir": "${file_path}",     "selector": "source.c, source.c++",     "shell": true,      "variants":     [         {             "name": "run",             "cmd": ["start", "cmd", "/k", "${file_path}/${file_base_name}.exe"],             "shell": true         }     ] } 

and save packages/user/c.sublime-build packages folder 1 opened selecting preferences -> browse packages....

you can choose build system selecting tools -> build system -> c. once ready compile, save source file, hit ctrlb build. run program, hit ctrlshiftb , cmd window open run resulting .exe file, stay open until close (so can see output produced program).

you can try use c++ build system comes sublime, users have run issues in past, on windows, custom 1 may suit needs better.

good luck!


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -