学习CPP网址
https://github.com/LearningInfiniTensor/learning-cxx
安装环境
1.配置xmake的环境
xmake是c++的构建工具
最简单的配置方法就是安装mcvs,然后选择必要的那两个包
查看版本,是否安装成功
gcc --version
g++ --version
2.安装xmake
我的是windows11,f复制下面的代码在powershell中
Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
3. 克隆and构建
git clone https://github.com/LearningInfiniTensor/learning-cxx.git
cd learning-cxx
xmake
4.运行
xmake run learn 0
这里有个坑,我的路径没设置好,有空格,导致二次编译运行就有bug,然后一直提示invalid agruement。
解决办法就是
在生成的commd string 两边加上""