BGI (Borland Graphics Interface) is used to make images in 16 bit (usually dos) out of text. Alot of old dos programs that have pixel art use some of these. But the error means your program is calling one of these functions and your compiling it as a win32 application. There are only a few select functions that you can use under windows 32bit apps out of the BGI, and what those are i don't recall, but its needless to say they are very depreciated and useless unless you plan on making some dos apps.

If you copy/pasted the code, i suggest reading through it to find out what it does and find out what is causing the compile error.

If you wrote it yourself, you should double check your BGI documentation, and make sure your not using any dos only calls.