Guys , i like writing code in sublime text editor and later use ideone to compile and run it . It obviously takes a lot of my time . I was thinking if anyone can help me in configuring ST2 , so that i can compile and run my programs from ST2 itself . I use windows 8.1 .
Dude , are you seriously like this , or you are just faking ? Either way , it is not cool at all .
Irony is he himself asked this question a couple of days back.link
So probably he's seriously like this, totally crazy
1> Download MinGW64 . 2> Go to Tools -> Build system -> New build system . 3> Paste this code
{ "cmd": ["g++.exe","-std=c++11", "-o", "$file_base_name", "$file"],
} and save the build . 4>Select this build system now . Save your programs inside Bin folder in MinGW64 .
I am getting this error message : [Error 5] Access is denied [cmd: [u'C:\MinGW\include\c++', u'C:\MinGW\bin\hello.cpp', u'-o', u'C:\MinGW\bin/hello']] [dir: C:\MinGW\bin] [path: C:\MinGW\bin;C:\MinGW\libexec\gcc\x86_64-pc-mingw32\4.8.2;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\ActiveState Komodo Edit 8\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\C:\MinGW\bin;] [Finished]
Try this :-
Go to System Properties -> Advanced -> Environment variables .
Make a new User variable "MinGW64" with the path to MinGW64 folder as value .
Screenshot
thanks it really helps me!
Doing this pops up a new window. I modified the C++ Single File, to add c++11 support. Here's the modified code.
{ "shell_cmd": "g++ "-std=c++11" "{file}" - o"{file_path}/{filebasename}"", "fileregex": "(..[: ] * ): ([0 - 9] + ): ?([0 - 9] + )?: ?(. * )", "working_dir": "{filepath}", "selector": "source.c, source.c + + ", "variants": [ { "name": "Run", "shellcmd": "g + + " - std = c + + 11""{file}" -o "{filepath} / {file_base_name}" && "{filepath} / {file_base_name}"" } ] }
But, this somehow increases the compile time.
If you didn't install mingw already:
pbox install mingw
to install mingw.Add installation folder to your PATH.
If you enter
g++
in command prompt, you should get something like this:Now, Install Sublime REPL.
Then, add below snippet to your Key Bindings — User file. (
Menu
➩Preferences
➩Key Bindings - User
)Now, just use
ctrl+b
to run your file.