美文网首页
blade编译c++环境

blade编译c++环境

作者: 小石头在长大 | 来源:发表于2021-02-04 10:07 被阅读0次

1、安装jdk

2、安装ninja

git clonehttps://github.com/ninja-build/ninja.git

cd ninja

./configure.py --bootstrap

cp ninja ~/bin/

3、安装blade

git clonehttps://github.com/chen3feng/blade-build.git

./install.sh

echo "export PATH=$PATH:~/bin/" >>  ~/.bash_profile

4、测试blade是否安装成功

mkdir test && cd test

touch BLADE_ROOT #建空文件

touch BUILD hello.cpp

cc_binary( name = 'hello_test', srcs = [ 'hello.cpp' ] )

#include <iostream>//using namespace std;int main() { std::cout << "Hello World" << std::endl;}

blade build .

5、运行编译成功的文件

cd build64_release 

 ./hello_test

相关文章

网友评论

      本文标题:blade编译c++环境

      本文链接:https://www.haomeiwen.com/subject/xizvtltx.html