How to setup graphics.h in CodeBlocks || How to Install graphics.h in Code::Blocks

Опубликовано: 10 Июль 2021
на канале: Sonu Sharan
3,935
28

How to Install graphics h in Code::Blocks, Problem Solved Graphics.h

Please follow below steps in sequence to include “graphics.h” in CodeBlocks to successfully compile graphics code on Codeblocks.

Step 1 : To setup “graphics.h” in CodeBlocks, first set up winBGIm graphics library.
Download WinBGIm from http://winbgim.codecutter.org/

Step 2 : Extract the downloaded file. There will be three files:
i) graphics.h
ii) winbgim.h
iii) libbgi.a

Step 3 : Copy and paste graphics.h and winbgim.h files into the include folder of compiler directory.

Step 4 : Copy and paste libbgi.a to the lib folder of compiler directory.

Step 5 : Open Code::Blocks. Go to Settings→ Compiler→ Linker settings.

Step 6 : In that window, click the Add button under the “Link libraries” part, and browse. Select the libbgi.a file copied to the lib folder in step 4.

tep 7 : In right part (ie. other linker options) paste commands

-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32

Step 8 : Try compiling a graphics.h program in C or C++, still there will be an error. To solve it, open graphics.h file pasted in include folder in step 3 with Notepad++. Go to line number 302, and replace that line with this line : int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX,

Step 9 : Save the file. Done !


Смотрите видео How to setup graphics.h in CodeBlocks || How to Install graphics.h in Code::Blocks онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Sonu Sharan 10 Июль 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,93 раз и оно понравилось 2 людям.