Sublime Forum

Run C++ programm in new window

#1

Hello!
How run c++ project in new window (like as codeblocks)?

OS:ubuntu 12.10 x86
compiler: g++

[code]{
“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",
		"shell": true,  //! don't working. "true" - too.
		"cmd": "bash", "-c",  "${file_path}/./${file_base_name}"  ]
	}
]

}
[/code]

Thanks!

0 Likes

#2

Sorry.
I found solution:

"cmd": "bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && xterm -T '${file_path}/${file_base_name}' -e '/usr/bin/cb_console_runner' '${file_path}/${file_base_name}' "]
0 Likes