Sublime Forum

My Build System

#1

Hello! I want to make a my Build System for C/C++. I need to create a folder build, if it does not exist, and to put the compiled program.
In the terminal of Ubuntu it works, but in the ST3 Build System - does not work.

{
    "cmd": ["mkdir", "-p", "../build", "&&", "g++", "${file_name}", "-o", "../build/${file_base_name}.o"],
    "selector": ["source.cpp", "source.c"],
    "working_dir": "${project_path}",
}
0 Likes

#2

Use shell_cmd for this kind of operation, since you are using the shell environment (&&) to execute this command. cmd is only for directly running executables with arguments.

1 Like

#3

Thanks! Now it works.

0 Likes