简体   繁体   English

我们如何在Visual Studio的Windows中包含bgi库?

[英]how do we include bgi library in windows with visual studio?

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. 我正在使用Visual Studio 2015,并且由于某些大学原因,我需要使用bgi图形库。我们如何在程序中包含该库,以便可以使用其功能。

TIA. TIA。

TL;DR TL; DR

You don't. 你不知道 At least not without a lot of work. 至少不是没有很多工作。

Rational 合理的

First, a bit of history. 首先,有一点历史。

BGI stands for Borland Graphics Interface. BGI代表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. 它在1987年至1992年之间随Borland工具一起提供。这是很久以前的<exp删除删除”,类似于计算机时代的青铜时代或铁器时代。 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. 自2000年代初期以来,原始BGI就无法在计算机上运行,​​并且主要的PC操作系统已从DOS和基于DOS的Windows更改为基于NT的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. WinBGI是用于现代计算机的BGI的端口,已于2005年左右发布,用于Visual Studio 2005和当时基于GCC 3.4的现代编译器。 I believe this library was later recompiled to support Visual Studio 2010. 我相信此库后来被重新编译以支持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. 如果不做大量工作,则不能使Visual Studio 2015使用BGI库的任何正式版本(对于WinBGI是半官方的)。

Potential Solutions 潜在解决方案

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. 最简单的解决方案是假装回到过去,并使用BGI附带的编译器工具,1980年代和1990年代初期Borland的Turbo系列构建工具或WinBGI支持的Visual Studio和GCC版本。 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. 您很有可能不会错过过去30年中引入C ++的许多内容,因为如果BGI包含在课程中,则标准模板库,Standard C ++和Modern C ++可能不在课程中。

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. 如果必须使用Visual Studio 2015,则可以下载WinBGI的源代码并尝试自己构建该库,或寻找其他已经为您完成此工作的人。 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. 请记住,1991年, 这个来自芬兰的孩子写了Linux Kernel只是为了好玩。

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. 如果您没有从1980年代开始学习任何工具和意识形态,您将更容易过渡到工业。

Introduce them to the likes of SDL ( https://www.libsdl.org/ ), SFML ( https://www.sfml-dev.org/ ). 向他们介绍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. 在过去的30年中,发生了许多重大变化(C ++现在具有内置文件系统支持!),您不必错过它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM