在 MAC 上,我可以使用命令行成功编译 c++ 程序
g++ *.cpp *.h -o executablename
但是它在 Sublime 2 中失败了——我为此创建了一个构建系统
{
"cmd" : ["g++", "*.cpp", "*.h", "-o", "executablename"]
}
有了这些结果
i686-apple-darwin11-llvm-g++-4.2: *.cpp: No such file or directory
i686-apple-darwin11-llvm-g++-4.2: *.h: No such file or directory
i686-apple-darwin11-llvm-g++-4.2: no input files
[Finished in 0.0s with exit code 1]
但是,如果我在项目中创建具有特定文件名的构建系统,它可以工作:
{
"cmd" : ["g++", "Test.cpp", "TestCode.cpp", "TestCode.h", "TestCode2.cpp", "TestCode2.h", "-o", "executablename"]
}
如何在 Sublime 2 中创建一个构建系统,它使用命令行模式来编译多个文件,就像在命令行上一样?