All files are downloadable from the links below-
1.codeblocks-16.01 mingw-setup.exe(http://sourceforge.net/projects/codeblocks/files/Binaries/16.01/Windows/codeblocks-16.01mingw-setup.exe)
2.graphics.h(https://drive.google.com/open?id=0B-40c0cCWp97WlctLVdERU1OaTA)
3.winbgim.h(https://drive.google.com/open?id=0B-40c0cCWp97RzlSak9wb19wdlE)
4.libbgi.a(https://drive.google.com/open?id=0B-40c0cCWp97bVIzNEp6cTR1a0k)
5.linker.txt(https://drive.google.com/open?id=0B-40c0cCWp97cnY3UGJJMFRMTmc)
6.Test graphics.cpp(https://drive.google.com/open?id=0B-40c0cCWp97QkJSRVdGcWdoMEk)
now simply follow those steps ;)