mingw-v4.8.0+ede-v13.04 configuration using the C-Language graphics library

Source: Internet
Author: User

From : http://www.cnblogs.com/killerlegend/p/3946768.html

Author:killerlegend

date:2014.8.30

MingW the configuration tutorial is here : http://www.cnblogs.com/killerlegend/p/3746504.html

EDE The graphics library can be downloaded here : http://misakamm.bitbucket.org/man/index.htm , its source code is here . : http://sourceforge.net/p/tcgraphics/code/HEAD/tree/

when this article was written, , The latest version is 13.04, You can also go to my Baidu cloud download (

Library File Download : Links: http://pan.baidu.com/s/1i3qqTm9 Password: CHWL

Source code Download : Links: Http://pan.baidu.com/s/1jG9lLII Password: Fdds).

The contents of the extracted files are as follows :

as shown , Copy the files in the red box to MingW of the include and the Lib folder under :

after the copy is complete , Create a C + + file , Enter the code as follows :

1#include <graphics.h>2 3#include <time.h>4 5#include <math.h>6 7  8 9 voidPaintstar (DoubleXDoubleYDoubleRDoublea)Ten  One { A  - intpt[Ten]; -  the  for(intn =0; N <5; ++N) -  - { -  +pt[n*2] = (int) (-cos (PI *4/5* n + a) * R +x); -  +pt[n*2+1] = (int) (Sin (PI *4/5* n + a) * R +y); A  at } -  -Fillpoly (5, PT); -  - } -  in   -  to intMain () +  - { the  *Initgraph (640,480 ); $ Panax NotoginsengSetColor (RGB (0xFF,0xFF,0xFF) ); -  theSetfillcolor (RGB (0,0,0xFF) ); +  A Setrendermode (render_manual); the  + DoubleR =0; -  $  for(; Is_run (); Delay_fps ( -) ) $  - { -  theR + =0.02; - Wuyi if(R > PI *2) R-= PI *2; the  -   Wu  - Cleardevice (); About  $Paintstar ( -, $, -, R); -  - } -  A return 0; +  the}

then, on the command line, enter :

g++ Main.cpp-o main-g-w-lgraphics-lgdi32-limm32-lmsimg32-lole32-loleaut32-lwinmm-luuid–mwindows

if it appears "Note:attribute for ' struct ege::mousemsg ' must follow the ' struct ' keyword struct mousemsg {" hint , Don't bother .

then run the generated Main.exe program , Then there will be a rotating pentagram. , as follows :

It looks pretty good. !

of the graphics library API file in Mans The folder below has , You can watch your own study. !

There's also a similar graphics library,calledEasyx,Homepage is: http://www.easyx.cn/,also good,SupportVCSeries,not supportedMingW,and not open source .,because I don't use it .IDEto program,so I chose to use theEde,edeOpen Source,This is really great ..

later I will configure the MingW posted to Baidu Cloud , the specific address will be posted here after uploading . , http://www.cnblogs.com/killerlegend/p/3821416.html, Extract Password killerlegend.

mingw-v4.8.0+ede-v13.04 configuration using the C-Language graphics library

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.