Please LIKE & SUBSCRIBE if you liked this video.
Download from here:
graphics.h can be used in CodeBlocks by adding WinGBIm in MinGW compiler. Some header files and library files should be copied in the compiler directory & linker should be configured to run graphics program in CodeBlocks using C and C++.
If you are getting sstream not found, then you probably trying to run a .c file program. sstream is c++ header so graphics.h won’t works with c.
1. Download WinBGIm. Downloading from other website may not work.
2. Extract it.
3.Open info.txt for linker options and more information.
4. Copy MinGW folder to your Code::Blocks installation directory. Default Code::Blocks installation directory is C:Program Files (x86)CodeBlocks. There will be MinGW folder already. Copying new MinGW folder only adds some library (libbgi.a) and header (winbgim.h, graphics.h) files in that directory. To manually add files, copy graphics.h and winbgim.h files in include folder of your compiler directory which is C:Program Files (x86)CodeBlocksMInGW. And copy libbgi.a to lib folder of your compiler directory.
5. Open Code::Blocks. In open Settings – Compiler – Linker Settings. Click Add button in link libraries part and browse and select libbgi.a file you just copied to MinGW folder.
6. In right part (i.e. other linker options) paste commands -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
7. Click OK.
If you don’t find MinGW inside codeblocks check in C:MinGW
View More: Cuocdoidanghien Education