Saturday, 20 May 2017

How to configure graphics.h header file in codeblocks IDE within few steps

How to configure graphics.h header file in codeblocks IDE within few steps

I have searched a lot on internet and gone through a lots of tutorials and posts but neither of them was working correctly  even if on youtube one can file a lots of videos about how to configure and add graphics.h header file in codeblocks but they are not working in most of the cases.The reason was buggy graphics.h header file.So searching on the internet I succeeded to find out the buggy graphics.h header file and got success in configuring the graphics.h header file successfully with codeblocks.
So its good to go with the steps.

Step-1.Download the file from here and extract it.
                                                           Download now

Step-2.copy graphics.h and winbgim.h and paste it in the include folder  where your codeblocks is installed.
for example: (C:\Program Files (x86)\CodeBlocks\MinGW\include).

Step-3.Now copy the libbgi.a file to the lib folder near to the include folder
for example: (C:\Program Files (x86)\CodeBlocks\MinGW\lib).

step-4:The second last step is to go to Setting->compiler then linker setting.
You can find two boxes named Link Libraries and Other Linker Options.
Then you can find and add button in Link Libraries Just click on add and brows and select the file libbgi.a that we have pasted in lib folder in step 3.

step-5 :The last and important step is the linker command that we have to write in the linker box which is in the right side of Linker Libraries .
Paste these commands in that box as it is.







 Thats it we have successfully configured the codeblock with graphics.h.
Now enjoy coding..........

Insert image in c using codeblocks


  1. I got an error which says
    sstream:No such file or directory
    Why so...?

  2. Brother is not going to install files from this link

  3. This comment has been removed by the author.

  4. sstream.h giving error .. no such file or directory exists

  5. I found best article.thank you for sharing useful info.
    web programming tutorial

  6. bro when it runs the graphic window doesn't appear instead a pop up window appears which says that program_name.exe has stopped working please help me out ... i am using codeblocks

  7. In these institutions academics, programmers and graphic design teachers can meet with professional designers and discuss the way business is moving forward and requirements of the labour market.vizitinÄ—s kortelÄ—s

  8. We at Dextemade beamed many diversified brands. And we are also honored to provide you Development, Digital Marketing, 2D / 3D Animation, Graphics Design, and 3D Designing Services to beam your brand / aim too. With our complete preparation. We have a team with very high leading expert professionals.

  9. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. background removal service

  10. Thanks for an interesting blog. What else may I get that sort of info written in such a perfect approach? I have an undertaking that I am just now operating on, and I have been on the lookout for such info. professional photoshop services

  11. Your article provide me huge knowledge related to Cliping path services.
    Thanks for sharing this photoshop services


WhatsApp will give Rs 1.8 crores to new Indian startups, Here is all you need to know

The "Startup India WhatsApp Grand Challenge" has been appraise growth in the entrepreneurial sector. Total prize money of Rs 1.8...