安装xmake
wget https://xmake.io/shget.text -O - | bash
可能会报错
error while loading shared libraries: libatomic.so.1: cannot open shared object file:
xmake: error while loading shared libraries: libatomic.so.1: wrong ELF class: ELFCLASS32
对于Centos8,请以根用户root运行下面命令:
cd /etc/yum.repos.d/
wget https://download.opensuse.org/repositories/home:aevseev:devel/CentOS8/home:aevseev:devel.repo
yum install libatomic1
对于 CentOS7,请以根用户 Root 运行下面命令:
cd /etc/yum.repos.d/
wget https://download.opensuse.org/repositories/home:aevseev:devel/CentOS7/home:aevseev:devel.repo
yum install libatomic1
Ubuntu 20.04
参考 https://zhuanlan.zhihu.com/p/473205876
sudo add-apt-repository ppa:xmake-io/xmake
sudo apt update
sudo apt install xmake
安装成功后,运行
xmake --version
xmake命令直接构建