I have downloaded the graphics.h files and placed them in the right directories, and linked to -lbgi. The DevC++ compiler is giving errors such as the following:
C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/libbgi.a when searching for -lbgi
What can I do now? What causes incompatibility with libbgi.a ?
Borland Graphical Interface belongs in a museum, and you're going to need a museum compiler to use it.
Dev-C++, whether it is the Bloodshed version or the Orwell fork, is outdated. The Orwell fork was last updated April 2015. Bloodshed essentially ceased being updated in 2005, there was a minor web update in 2008.
I occasionally still use the Orwell fork to compile code with C++11 compliance, when I want a 64-bit exe. I know it won't have any C++14 or later features.