我正在做一个与鼠标编程相关的项目。我有一个问题,graphics.h,conio.h和dos.h没有在gcc工作。我试过http://blog.eternal-thinker.com/2010/09/how-to-use-graphicsh-in-ubuntu.html。
当我进来的时候
sudo apt-get install build-essential我得到了:
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.然后我试着
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我得到了以下错误:
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.h,conio.h和dos.h。
发布于 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等人不支持。
发布于 2013-05-06 12:49:12
Embarcadero/Borland在其网站上为下载提供了Turbo版本2。因为它是一个运行在DOS下的旧编译器,所以您需要安装dosbox才能使用它。
您可能希望开始使用现代图形库(如SDL ),这将允许您在Ubuntu中进行图形/鼠标输入。
https://askubuntu.com/questions/277961
复制相似问题