我们如何在带有 Visual Studio 的 Windows 中包含 bgi 库? [英] how do we include bgi library in windows with visual studio?

查看:56
本文介绍了我们如何在带有 Visual Studio 的 Windows 中包含 bgi 库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio 2015 工作,出于一些大学的原因,我需要使用 bgi 库来制作图形.我们如何将这个库包含在我们的程序中,以便我们可以使用它的功能.>

TIA.

解决方案

TL;DR

你没有.至少不是没有大量工作.

理性

首先,有点历史.

BGI 代表 Borland 图形界面.它在 1987 年到 1992 年间随 Borland 工具一起提供.很久以前,类似于青铜器或铁器时代,在计算机时代.自 2000 年代初以来,Raw BGI 就无法在计算机上运行,​​占主导地位的 PC 操作系统从 DOS 和基于 DOS 的 Windows 变为基于 NT 的 Windows.

WinBGI 是用于现代计算机的 BGI 端口,于 2005 年左右针对 Visual Studio 2005 和当时基于 GCC 3.4 的编译器发布.我相信这个库后来被重新编译以支持 Visual Studio 2010.

如果没有大量工作,您无法使 BGI 库的任何官方或(在 WinBGI 的情况下为半官方)版本与 Visual Studio 2015 一起使用.

潜在解决方案

最简单的解决方案是假装回到过去并使用 BGI 随附的编译器工具、1980 年代和 1990 年代早期的 Borland Turbo 系列构建工具,或 WinBGI 支持的 Visual Studio 和 GCC 版本.很可能你不会错过过去 30 年引入 C++ 的许多东西,因为如果 BGI 在课程中,那么标准模板库、标准 C++ 和现代 C++ 很可能不在课程中.

如果您必须使用 Visual Studio 2015,您可以下载 WinBGI 的源代码 并尝试自己构建库或找到已经为您完成这项工作的其他人.请注意,这不是一项微不足道的任务,您可能会从让这个库在现代计算机和操作系统上可靠地工作中学到更多,而这正是您从正在上课的课程中学到的.这不是不可能的.请记住,早在 1991 年,这个来自芬兰的孩子编写 Linux 内核只是为了好玩.

不过……

现在对您来说可能为时已晚,但从长远来看,如果您能说服您的机构将他们的教材升级到本千年,最好是本十年,那么您和随后的学生会过得更好.如果您没有从 1980 年代开始学习工具和意识形态,那么您将更容易过渡到行业.

向他们介绍 SDL(https://www.libsdl.org/),SFML(https://www.sfml-dev.org/).在过去的 30 年里发生了很多很棒的变化(C++ 现在有内置的文件系统支持!),你不应该错过它们.

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.

解决方案

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. 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.

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. 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.

这篇关于我们如何在带有 Visual Studio 的 Windows 中包含 bgi 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆