首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >H,conio.h和dos.h没有在gcc工作

H,conio.h和dos.h没有在gcc工作
EN

Ask Ubuntu用户
提问于 2013-04-04 20:12:04
回答 2查看 21.9K关注 0票数 3

我正在做一个与鼠标编程相关的项目。我有一个问题,graphics.hconio.hdos.h没有在gcc工作。我试过http://blog.eternal-thinker.com/2010/09/how-to-use-graphicsh-in-ubuntu.html

当我进来的时候

代码语言:javascript
复制
sudo apt-get install build-essential

我得到了:

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
build-essential set to manually installed.

The following packages were automatically installed and are no longer required:
calligra-l10n-engb cdparanoia k3b k3b-data k3b-i18n kdevelop-l10n
  kdevelop-php-docs-l10n kdevelop-php-l10n language-pack-kde-en libflac++6
  libk3b6 libkcddb4

Use 'apt-get autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

然后我试着

代码语言:javascript
复制
sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-1.8 guile-1.8-dev libsdl1.2debian-all libart-2.0-dev libaudiofile-dev libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-dev libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev libslang2-dev libasound2 libasound2-dev

我得到了以下错误:

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree       
Reading state information... Done

Package libsdl1.2debian-all is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or is only available from another source

However the following packages replace it:

  libsdl1.2debian

E: Package 'libsdl1.2debian-all' has no installation candidate

请帮助我使用gcc的graphics.hconio.hdos.h

EN

回答 2

Ask Ubuntu用户

发布于 2013-04-05 04:31:20

据我所知,graphics.h是一个过时的Borland C++头文件,用于Ms操作系统中的图形。我认为上一个Borland C++Builder不再支持graphics.h。但是,在Windows上已经模拟了graphics.h。使用graphics.h制作的可执行文件通常不适用于较新的PC(以及Windows操作系统下的笔记本电脑)。

(虽然graphics.h易于使用图形函数,但不再推荐/支持使用它)

而且,开源C++编译器通常不支持conio.h。

H在Borland编译器中具有大多数功能。MS VC++也支持它,但功能较少。gcc等人不支持。

票数 6
EN

Ask Ubuntu用户

发布于 2013-05-06 12:49:12

Embarcadero/Borland在其网站上为下载提供了Turbo版本2。因为它是一个运行在DOS下的旧编译器,所以您需要安装dosbox才能使用它。

您可能希望开始使用现代图形库(如SDL ),这将允许您在Ubuntu中进行图形/鼠标输入。

票数 4
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/277961

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档