Sublime Forum

Can't build .cpp file on Lubuntu

#1

To run a “.cpp” file in terminal, I creat a new .sublime-build, like this:

[code]{
“cmd”: “g++”, “-Wall”, “-Wextra”, “-pedantic”, “-std=c++11”, “${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": "bash", "-c", "g++ -Wall -Wextra -pedantic -std=c++11 '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
    }
]

}[/code]
When I run (ctrl + shift + B), my program is performed in a terminal window.
It work on Ubuntu, but doesn’t on Lubuntu. I think it happens because Lubuntu uses Lxterminal instead of terminal.
Is it a bug of sublime-text or did I miss something?
Hope for your advices. Thanks.

0 Likes