GithubHelp home page GithubHelp logo

vscode-xege-template's Introduction

VS Code + EGE 图形库模板

使用方法

  1. 使用 VS Code Config Helper v4 配置一遍。这只是确保你正确安装了编译器。如果你之前配置过,则可以跳过这一步;如果你是第一次配置,按照程序说明完成所有操作。配置完成后,可直接删除工作文件夹,这里不需要它。
  2. 下载或克隆本仓库。
  3. 安装 Xmake
  4. 在 VS Code 中打开本仓库。
  5. 在 VS Code 的终端中执行如下 Configure 命令:
xmake f -pmingw

如果你安装了 MSVC(Visual Studio),则更建议你使用 xmake f(不带 -pmingw)作为 Configure 命令。

编辑代码

你可以将你的源代码放在 src 文件夹中。本仓库提供了简单的测试代码,放在 src/main.cpp 中(代码内容为输出“月牙形”)。在你开始编辑或进行文件操作(比如添加/删除/重命名源文件)时,建议你运行 update intellisense 任务以获得良好的 IntelliSense 智能提示。

运行 update intellisense 的方法是:按 Ctrl + Shift + P,执行 Tasks: Run task 命令,选择 update intellisense 运行。如果智能提示出现异常(如“找不到 <graphics.h>”、#include error detected 等),则运行此命令可以解决大部分问题。

编译与运行

Ctrl + Shift + B 编译项目。按 F6(即你在 VS Code Config Helper 中选择的运行快捷键)运行项目。

第一次编译的时候,程序会下载必要的构建工具和 EGE 库的源代码,并尝试编译 EGE 库。这一般需要一段时间,请耐心等待。在此期间,尽可能保持网络畅通。如需“翻墙”,请不要使用“代理模式”(改用“虚拟个人网络”/VPN 等方式)。

其它

你可以修改 xmake.lua 中的 target 函数调用,以修改项目名称和最终生成的可执行文件名称。

你可以选择安装 Xmake VS Code 扩展。这不是必要的,但它提供了一些更简便的使用 Xmake 的方法。

vscode-xege-template's People

Contributors

guyutongxue avatar wzf03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

wzf03 lihongrui12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.