Is there any library similar to <conio.h>?
Solution 1
It looks like you need to use the curses.h file instead. See here : https://stackoverflow.com/questions/8792317/why-cant-i-find-conio-h-on-linux
Solution 2
the best way, is create a symlink between curses.h
and conio.h
like:
ln -s /usr/include/curses.h /usr/include/conio.h
then you can use
#include <curses.h>
or
#include <conio.h>
if you don't have curses.h
# debian/ubuntu
$ sudo apt-get install libncurses5-dev libncursesw5-dev
# voidlinux
$ xbps-install -S ncurses-devel
# archlinux
$ pacman -Sy ncurses
# redhate/fedora/suse...
$ sudo yum install ncurses-devel
Solution 3
You may look at https://github.com/pushkar6723/conio4gcc
Note that this is only compatible file. I recommend to shift on curses.h file, which has lot many things, which are absent in conio.h file.
Related videos on Youtube
Patterson
Updated on September 18, 2022Comments
-
Patterson over 1 year
I used the IDE DEV C++ to compile C programs on Windows and I used the libraries and , but now I use Ubuntu and downloaded the Codeblocks, but it does not have these libraries. I just wanted to use some function similar to getch(), which is present in the library conio. Is there any similar library? And if there is how do I install?
-
Chuck R about 10 yearsconio.h is a non-standard Borland header. I got used to it in the short time I was developing in Windows as well (also with Bloodshed Dev-C++).
-