Reputation: 50
i am working on visual studio 2015 and for some college reasons i need to work with bgi library for graphics.how do we include this library in our program so we can use its functions.
TIA.
Upvotes: 0
Views: 2672
Reputation: 33932
You don't. At least not without a lot of work.
First, a bit of history.
BGI stands for Borland Graphics Interface. It shipped with Borland tools between 1987 and 1992. That was a <expletive deleted> of a long time ago, something akin to the Bronze or Iron Age, in computer years. Raw BGI has not worked on computers since the early 2000s and the dominant PC operating system changed from DOS and DOS-based Windows to NT-Based Windows.
WinBGI, a port of BGI for modern computers, was released around 2005 for Visual Studio 2005 and then-modern GCC 3.4-based compilers. I believe this library was later recompiled to support Visual Studio 2010.
You cannot make any official or (semi-official in the case of WinBGI) versions of the BGI library work with Visual Studio 2015 without a great deal of work.
The simplest solution is to pretend go back in time and use the compiler tools with which BGI was was shipped, Borland's Turbo line of build tools from the 1980s and early 1990s, or WinBGI supported Visual Studio and GCC versions. It is very likely that you will not miss the many things introduced to C++ over the past 30 years because if BGI is in the curriculum it is likely that the Standard Template Library, Standard C++, and Modern C++ are not in the curriculum.
If you must use Visual Studio 2015, you can download the source code for WinBGI and attempt to build the library yourself or find someone else who has already done this work for you. Please note that this will not be a trivial undertaking and that you will likely learn more from getting this library working reliably on a modern computer and Operating System on your own that you will from the class you are taking. It's not impossible. Remember that back in 1991 this kid from Finland wrote the Linux Kernel just for fun.
However...
It's probably too late for you, but you, and the students that follow, are better off in the long run if you can convince your institution to upgrade their teaching materials to this millennium and preferably this decade. You'll have a much easier transition into industry if you aren't taught tools and ideologies from the 1980's.
Introduce them to the likes of SDL (https://www.libsdl.org/), SFML (https://www.sfml-dev.org/). There have been a lot of groovy changes over the last 30 years (C++ has built-in file system support now!) and you shouldn't have to miss out on them.
Upvotes: 6