Sublime Forum

Flags not working for sublime c++

#1

My C++ Build System for sublime text 3
{
“cmd”:[“bash”, “-c”, “g++ -g -std=c++14 -Wall -Wextra -fsanitize=undefined’${file}’ -o ‘${file_path}/${file_base_name}’ && timeout 3s ‘${file_path}/${file_base_name}’”],
“file_regex”: “^(…[^:]):([0-9]+):?([0-9]+)?:? (.)$”,
“working_dir”: “${file_path}”,
“selector”: “source.c, source.c++”,
“variants”:
[
{
“name”: “Run”,
“cmd”:[“bash”, “-c”, “g++ -std=c++14 ‘${file}’ -o ‘${file_path}/${file_base_name}’ && timeout 2s ‘${file_path}/${file_base_name}’”]
}
]
}
I am using this build system for building my c++ files but none of flags seems to be working as I am not getting any type of errors like array index out of bound , is their any solution for that I cant find anything useful over the internet to let me use these flags for my sublime text
Any kind of help is appreciated

0 Likes

#2

If you’re using bash for you build, you might as well use shell_cmd instead of cmd. I don’t see why those wouldn’t work, however.

0 Likes