I'm trying to use "graphics.h" just for learning purpose. I'm trying to draw a arc but "Code Block 13.12" gives this error:-
"Program has stopped working"
Code I'm using:-
#include<graphics.h>
int main()
{
int gd = DETECT;
int gm;
initgraph(&gd, &gm, "");
arc(100, 100, 0, 150, 50);
getch();
closegraph();
return 0;
}
As Code Block by default doesn't have "graphics.h". So, I followed One tutorial to setup graphics.h in Code Block which has the following steps.
1. Download "WinBGIm_Library6_0_Nov2005.rar" from
http://winbgim.codecutter.org/
2. After extraction put "graphics.h" & "winbgim.h" in "C:\Program Files\CodeBlocks\MinGW\include" folder
3. "libbgi.a" in "C:\Program Files\CodeBlocks\MinGW\lib" folder
4. Setting -> Compiler -> Global compiler setting
5.under "Link Libraries" section add
"C:\Program Files\CodeBlocks\MinGW\include"
6. under "Other linker options" section add
-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
7. Open "graphics.h" from "C:\Program Files\CodeBlocks\MinGW\include" in notepad and jump to line 302 and edit it to
int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX,
Please tell whats the problem?