lundi 14 août 2017

JSON format in Sublime Text 3 compiler build file

I'm trying to compile a c++11 file in Sublime Text3 on Mac OS Sierra with this JSON configuration, but unfortunately the print statements dont appear in the 'compiled' text box.

{
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", //from c++ build file     
    "shell":true,
    "shell_cmd": "g++ -std=c++11 \"${file}\" -o \"${file_path}/${file_base_name}\" 2>&1 >/dev/null | grep -v -e '^/var/folders/*' -e '^[[:space:]]*.section' -e '^[[:space:]]*^[[:space:]]*~*'",//" && \"${file_path}/${file_base_name}\"",
    "syntax" : "Packages/User/CPPoutput.tmLanguage",
}

-However they do print when the "shell_cmd" is replaced with

"shell_cmd": "g++ -std=c++11 \"${file}\" -o \"${file_path}/${file_base_name}\"  && \"${file_path}/${file_base_name}\"",

-but my compiler will print out MANY various warnings that read like this

/var/folders/cj/1h3_84h56c9bgzt_ryhpf4940000gn/T//ccrbyBrV.s:103:11: warning: section "__textcoal_nt" is deprecated
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
                 ^      ~~~~~~~~~~~~~
/var/folders/cj/1h3_84h56c9bgzt_ryhpf4940000gn/T//ccrbyBrV.s:103:11: note: change section name to "__text"
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
...and so on

How do I fix the JSON file, and are there any other solutions? (I'd prefer to fix the syntax in the JSON file, but either way. Thanks. From what I understand, these warnings are only printed with the latest mac os (sierra).

Aucun commentaire:

Enregistrer un commentaire