Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Working C++.sublime-build on Windows
{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"cmd": ["${file_path}/${file_base_name}.exe"]
}
]
}
@idlephilosopher

This comment has been minimized.

Show comment Hide comment
@idlephilosopher

idlephilosopher Apr 4, 2013

Thanks so much! This saved me a ton of time trying to figure out the details. :)

Thanks so much! This saved me a ton of time trying to figure out the details. :)

@walbarello

This comment has been minimized.

Show comment Hide comment
@walbarello

walbarello Jul 21, 2013

Hohoho, thanks so much, man! This saved me too! :D

Hohoho, thanks so much, man! This saved me too! :D

@gsantiago

This comment has been minimized.

Show comment Hide comment
@gsantiago

gsantiago Sep 30, 2013

The scanf does not works.

The scanf does not works.

@jpcofr

This comment has been minimized.

Show comment Hide comment
@jpcofr

jpcofr Mar 4, 2015

For the record, couldn't build at windows because I was opening sublime without administration privileges.

jpcofr commented Mar 4, 2015

For the record, couldn't build at windows because I was opening sublime without administration privileges.

@jainrocks

This comment has been minimized.

Show comment Hide comment
@jainrocks

jainrocks Apr 10, 2015

Hey what is file, file_path and file_base_name?

Hey what is file, file_path and file_base_name?

@jitsguy

This comment has been minimized.

Show comment Hide comment
@jitsguy

jitsguy Apr 20, 2015

Hi, Im new to this stuff, where do I paste that code in order for me to compile using cmd?

jitsguy commented Apr 20, 2015

Hi, Im new to this stuff, where do I paste that code in order for me to compile using cmd?

@lsandrade

This comment has been minimized.

Show comment Hide comment
@lsandrade

lsandrade Apr 24, 2015

Thank you :)

Thank you :)

@aanelzam93

This comment has been minimized.

Show comment Hide comment
@aanelzam93

aanelzam93 May 10, 2015

oke thank so much

oke thank so much

@dprophecyguy

This comment has been minimized.

Show comment Hide comment
@dprophecyguy

dprophecyguy Aug 26, 2015

How to use that code ?

How to use that code ?

@NaikSoftware

This comment has been minimized.

Show comment Hide comment
@NaikSoftware

NaikSoftware Oct 3, 2015

@dprophecyguy Tools->Build System->New build system
But this config not working..

@dprophecyguy Tools->Build System->New build system
But this config not working..

@shashank88

This comment has been minimized.

Show comment Hide comment
@shashank88

shashank88 Oct 16, 2015

Is there a way to default to g++ 11 ? like in linux we add "-std=c++11" flag ?
I want to use c++11 features like looping with auto etc.

Is there a way to default to g++ 11 ? like in linux we add "-std=c++11" flag ?
I want to use c++11 features like looping with auto etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment