跳到正文

个人记录

1.ege 的安装

wchar_t约 2 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月18日
篇幅
约 2 分钟
获赞
1

版本

  1. v1当前

方法1

首先到官网下载 ege:xege.org

接下来,设Dev-C++的位置为 %DevCpp%:

  1. 把 include 里的内容(ege 文件夹,ege.h,graphics.h)拷到 %DevCpp%\MinGW64\x86_64-w64-mingw32\include 里。

  2. 把 lib\devcpp 里的内容(两个.a)拷到 $DevCpp%\MinGW64\x86_64-w64-mingw32\lib 里。

  3. 打开 Dev-C++,在 Add the following commands when calling the linker 里加上:

代码
 -lgraphics64 -luuid -lmsimg32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lgdiplus
  1. 用下面的代码测试你能不能用 ege。
C++
#include <graphics.h>

int main() {
	initgraph(640, 480);
	getch();
	closegraph();
	return 0;
}
  1. 如果你的屏幕上出现了一个黑框框,则说明你成功了,恭喜!

  2. 如果没有,那就把 -lgraphics64 改成 -lgraphics 试一遍。

方法2

Red Panda C++ 是 Dev-C++ 的一个改进版,它支持诸多功能,如语法自动检查,CPEditor 主要功能等。

Red Panda C++ 预装了 ege 和 raylib(另一个开发游戏的库),因此对于 ege 学习十分方便。

Red Panda C++ 的官网:https://royqh1979.gitee.io/redpandacpp/

然后你可以新建xege项目,由于过于简单,所以不多赘述。


ege火车下一站:未开通

ege火车上一站:本站为起点站

原文