How can I compile and run programs using graphics.h in code::blocks?

可紊 提交于 2019-12-11 08:42:11

问题


I am new to code::blocks, so I was wondering how could I compile and run my computer graphics animation programs (those that use graphics.h) in Code::Blocks.

Is this possible with the default installation? Any kind of help would be appreciated.


回答1:


This is impossible. You can't use graphics.h without a time machine, so you're better off forgetting about it altogether. This question gets asked about once a week, and the consensus is always the same.

The graphics.h header is a proprietary graphics library included with Borland compilers back in the early 1980s. It is not a standard C or C++ library, and hasn't been modern or relevant for at least 20 years. It should come as no surprise that it does not work with modern compilers, or on modern operating systems. Using or learning to use it is an utter and complete waste of time. If your educational system is insisting upon you doing so, you should be entitled to a complete refund of your tuition.

It's good that you're moving up to a modern IDE like Code::Blocks. You should also upgrade your library and toolkits while you're at it. If you want to write graphics applications, you're undoubtedly going to be doing so in a graphical environment like Windows or X. You might as well learn the way to do it there, rather than getting lines to appear in an MS-DOS emulator and marveling at the appeal of retro tech.



来源:https://stackoverflow.com/questions/5062471/how-can-i-compile-and-run-programs-using-graphics-h-in-codeblocks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!