我想用easyx做个小demo,但是vs太大,想用vscode,请问要怎么做?
vscode配置easyx
第一段:刚刚成功了使用 VScode + EasyX;GCC编译器:gcc version 8.1.0;EasyX是C++的库;个人代码为C语言;#pragma comment(lib,"EasyXw.lib") 貌似并没有生效;所以在gcc编译配置中添加手动链接库文件的相关配置。使用文件:graphics.h;easyx.h;libeasyx.a;注:libeasyz.a文件是在下面这个网站中的链接中下载的,在EasyX主页中下载到的库文件是 .lib格式的。也可能是我没有找对地方。使用 lib格式的库文件(EasyXw.lib),我始终无法正确链接库文件。
第二段:参考:https://codebus.cn/bestans/easyx-for-mingw;添加配置 :"-L", "${fileDirname}\EasyX", "-leasyx" ;编译后报警:C:\Users\Dream-haohao\Desktop\test\EasyX/libeasyx.a(EasyX.o):EasyX.cpp:(.text+0x7c): undefined reference to operator delete[](void*)' ;C:\Users\Dream-haohao\Desktop\test\EasyX/libeasyx.a(EasyX.o):EasyX.cpp:(.text+0x187): undefined reference to operator delete' ;C:\Users\Dream-haohao\Desktop\test\EasyX/libeasyx.a(EasyX.o):EasyX.cpp:(.text+0x1c6): undefined reference to `operator new[](unsigned long long)' ;... ...
第三段:网上冲浪:得到结果:在编译配置中再添加:"-lstdc++" ;编译后通过,正常显示。参考:https://www.coder.work/article/799193 ;至于为什么,目前没有结果,以及为什么添加:"-lstdc++" 就正常了,希望有大佬朋友可以交流一下。希望以上内容可以帮助到你,也希望如果有新的进展可以继续交流。新手小白学习中...
第四段:如果你想要把生成文件发送给别人运行,你可以使用 ”-static“ ;选项,或者同时发送需要的DLL库,和生成文件在同一目录下即可。
我最近在做这件事,出现的问题是,无法链接到Easyx的lib库,使用的GCC编译器,-L和-l选型貌似也没有生效,我暂时还不知道这个-l命令怎么写。有进展期望分享
https://vk.com/topic-235286852_56212206
https://vk.com/topic-235286852_56212207
https://vk.com/topic-235286852_56212208
https://vk.com/topic-235286852_56212210
https://vk.com/topic-235286852_56212211
https://vk.com/topic-235286852_56212212
https://vk.com/topic-235286852_56212213
https://vk.com/topic-235286852_56212214
https://vk.com/topic-235286852_56212215
https://vk.com/topic-235286852_56212216
https://vk.com/topic-235286852_56212217
https://vk.com/topic-235286852_56212219
https://vk.com/topic-235286852_56212220
https://vk.com/topic-235286852_56212221
https://vk.com/topic-235286852_56212222
https://vk.com/topic-235286852_56212223
https://vk.com/topic-235286852_56212224
https://vk.com/topic-235286852_56212225
https://vk.com/topic-235286852_56212226
https://vk.com/topic-235286852_56212228
https://vk.com/topic-235286852_56212231
https://vk.com/topic-235286852_56212234
https://vk.com/topic-235286852_56212236
https://vk.com/topic-235286852_56212240
https://vk.com/topic-235286852_56212242
https://vk.com/topic-235286852_56212244
https://vk.com/topic-235286852_56212246
https://vk.com/topic-235286852_56212249
https://vk.com/topic-235286852_56212252
https://vk.com/topic-235286852_56212255
https://vk.com/topic-235286852_56212258
https://vk.com/topic-235286852_56212261
https://vk.com/topic-235286852_56212266
https://vk.com/topic-235286852_56212269
https://vk.com/topic-235286852_56212272
https://vk.com/topic-235286852_56212276




