[C / C ] Graphics in Dev-C

Update 24/05/2014: Tested successfully on all systems win 64 and 32 bit.
Use the library and graphics.h winbgim.h

The use of graphics on the dev-C bit difficult compared to when on Turbo C Turbo C allows use even longer dev-C is not, we need some small steps to set up graphics in Dev-C.

Content
Using the library winbgim.h
Using the library graphics.h

Using the library winbgim.h

How to make simple, Just copy the files into the folder is finished.
First you download the necessary files here

After you unzip the downloaded will see a folder “VietSource.net – Graphics in Dev-C” in directory 5 file:
You copy:
– file libbgi.a in directory lib (usually C:\Program FilesDev-CppMinGW32lib)
– file winbgim.h and graphics.h in directory include (usually C:\Program FilesDev-CppMinGW32include)
– 2 file 6-ConsoleAppGraphics.template and file ConsoleApp_cpp_graph.txt in directory Templates (usually C:\Program FilesDev-CppTemplates)

If you use win 64 bit, download the 32 bit on the ordinary settings and copy the files into the directory as above but from C:Program Files (x86)Dev-Cpp…

Next Dev C you boot up, in File->New–>Project…->Console Graphics Application
graphics in dev-C

Save project and you will see the main file content a simple program like this:

/*
graphics in Dev-C++ - nguyenvanquan7826
*/

#include <winbgim.h>

int main(int argc, char *argv[])
{
	// now, you can run project
	initwindow(300, 300);			// init window graphics
	setbkcolor(1);					// set background
   	cleardevice();
	setcolor(14);					// set text color
	outtextxy(50,100,"Graphics in Dev-C++");// print text in window graphics

	while(!kbhit()) delay(1);		// pause screen
	return 0;
} 

And immediately you can run it (When you need to keep running the main file).
Graphics in dev-C

Using the library graphics.h

You do the same with other library but is winbgim.h graphics.h library copy in C:Program FilesDev-CppMinGW32include. Then create such project and instead declared winbgim.h library, we library declaration graphics.h

Refer: Graphics Programming with C on Linux (Ubuntu)
Document graphics in C: dowload