图形学、01 GAMES101 + VSCODE + XMake + Win11 作业环境配置

GAMES101 + VSCODE + XMAKE + Win11 环境配置

安装

  • 安装 C++ 编译工具链,如 MSVC(visual studio)
  • 安装 Xmake: Xmake
  • VSCODE 安装插件
    • C/C++
    • XMake
    • CodeLLDB

获取作业

git clone https://github.com/star-hengxing/GAMES101-xmake.git

测试并安装所需第三方库

cd src/Assignment1
xmake -y
xmake run
  • 所有作业文档在 doc 目录
  • 所有模型在 models 目录
  • 每个作业运行环境都在自己作业目录下,有需要可以在 xmake.lua 里修改set_rundir的路径

打开任意作业

  1. 按 Ctrl + Shift + P 执行 >XMake: UpdateIntellisense
  2. 当前目录下新建文件 ./vscode/settings.json
{
  "clangd.arguments": [
    "--compile-commands-dir=.vscode",
  ],
  // "xmake.debugConfigType": "codelldb",
}
  1. Reload 项目
  2. Build 并运行项目
image-20231015174148974

解决乱码

也能解决问题: Executing task: 参数格式不正确 - -Command

修改全局 settings.json 添加如下代码

  "terminal.integrated.profiles.windows": {
    "powershell": {
      "source": "PowerShell",
      "args": [
        "chcp 65001; powershell -NoLogo"
      ]
    }
  },
  "terminal.integrated.defaultProfile.windows": "powershell",

posted @   小能日记  阅读(261)  评论(1编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示