Codeblocks graphics.h not working

xX Azezel Xx picture xX Azezel Xx · Dec 10, 2016 · Viewed 24.7k times · Source

When I do:

#include <graphics.h>

It says:

fatal error: graphics.h: No such file or directory

How to fix this?

I'm using codeblocks 16.01

Answer

unjankify picture unjankify · Dec 10, 2016

Using the angle brackets "<>" assumes graphics.h is part of the C standard library. After some research, it appears this file is no longer included in the library. If you wish to continue using this library, you will have to find graphics.h and place it in the same location as your source code.

In your source code, you will then write: #include "graphics.h"