当前位置:网站首页>在Clion中使用EasyX配置
在Clion中使用EasyX配置
2022-06-29 09:56:00 【Shine.Zhang】
看到了一个小程序,一个小球串联C语言的语法知识,也多年没写C代码了,拿出来练练,但是遇到了在Clion中使用EasyX配置的问题,搞了好久,记一下。
下载地址:https://easyx.cn/easyx
选择如下下载渠道:
参考:https://blog.csdn.net/youjohLee/article/details/124642649
EasyX默认安装只支持vc++和visual studio,如果想用在Clion等IDE中使用,需要适配MinGW;
下载并解压上述文件easyx4mingw_20220610:
将该文件夹(此处我重命名为EasyX)复制进Clion新建的项目中,在CMakeLists.txt中添加:
include_directories(./EasyX/include)
link_directories(./EasyX/lib64)
link_libraries(libeasyx.a)
放置在add_executable之前。

新版本的Clion已经捆绑安装了mingw,默认使用;
运行以下范例程序:
#include <graphics.h> // 引用图形库头文件
#include <conio.h>
int main()
{
initgraph(640, 480); // 创建绘图窗口,大小为 640x480 像素
circle(200, 200, 100); // 画圆,圆心(200, 200),半径 100
_getch(); // 按任意键继续
closegraph(); // 关闭绘图窗口
return 0;
}

边栏推荐
猜你喜欢

Software test model (V model and W model)

arcgis创建postgre企业级数据库

BUUCTF--reverse1

30-year-old female, ordinary software testing Yuanyuan, confused and anxious about her career

SQL Server 数据库的几种简单查询

Essential for efficient work: how can testers improve their communication skills?

Agctfb partial solution

【动态规划】—— 线性DP

SQL Server 数据库的统计查询

Comprehensive understanding of synchronized
随机推荐
1-数据库了解
反CSRF爆破的三种姿势
【NLP】文本生成专题1:基础知识
真正的测试 =“半个产品+半个开发”?
The product strength is not inferior to that of BYD. Geely Dihao l Raytheon hi · x delivered 10000 units in the first month
Analysis of BlockingQueue source code of AQS
LVGL库入门教程 - 动画
Fully understand the MESI cache consistency protocol
STM32F1與STM32CubeIDE編程實例-超聲波測距傳感器驅動
AQS之Atomic详解
np.astype()
Ora-01950 does not have permission on tablespace
Is it safe to open a securities account? Is it reliable?
Please tell me about the Flink SQL batch task, two or more tables join (inner join or outer join
BUUCTF--reverse2
【C语言进阶】字符串和内存函数(一)
他98年的,我玩不过他...
【C语言进阶】自定义类型
Offensive and defensive world re insfsay
BUUCTF RE-easyre