我想使用巴克从核素构建和运行C++程序。问题是我不知道如何在Nuclide中设置一个简单的Buck配置文件来构建并运行一个.cpp文件。
那么,有人有什么建议吗?
发布于 2017-01-21 00:26:25
使用Buck构建hello-world程序非常简单。在项目目录中创建以下文件:
.buckconfig
(可以为空)
main.cpp:
#include <iostream>
int main() {
std::cout << "Hello, world. " << std::endl;
return 0;
}BUCK
cxx_binary(
name = 'hello-world',
srcs = [
'main.cpp'
],
)如果您从项目文件夹中打开Atom,Nuclide应该会为您找到所有内容。
要检查一切是否正常,请运行以下命令:
buck run //:hello-world这应该足够入门了;更多信息可以在on the Buck website上找到。
https://stackoverflow.com/questions/41557770
复制相似问题