1

So I'm using Ubuntu 14.04 LTS and I realized while compiling code using Eclipse CDT as well as general C programs in a text editor executed using the Terminal that the system has no 'conio.h' library file installed. I read up on it, and as an alternative, tried to utilize the 'ncurses.h' file and it's functions but it tells me there's no such library file either.

Now I'm wondering is it possible that there's something wrong with my GCC entirely or is this a common issue and can be resolved by manually installing both files?

Edit : So it worked out for me and this is what I did

It required me to install ncurses-doc and THEN ncurses-dev :

sudo apt-get install ncurses-doc

sudo apt-get install ncurses-dev

This automatically installed everything for me including the dependencies and library files so I'd reckon whoever has the same issue, if you haven't tried a manual install by downloading the file and configuring it give this a try first.

Swapneel Mehta
  • 55
  • 1
  • 2
  • 12

2 Answers2

1

Have you installed ncurses?

sudo apt-get install ncurses-dev

Andy M
  • 596
  • 3
  • 7
  • I tried it however this error message is displayed : E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. – Swapneel Mehta Nov 06 '15 at 06:27
  • It's alright, I'll figure out a way to install it and get back to you. – Swapneel Mehta Nov 06 '15 at 06:28
  • @SwapneelMehta ok so run what it tells you to. also conio.h is an old windows header (not POSIX/unices) and ncurses doesn't come preinstalled – DTSCode Nov 07 '15 at 04:11
1

<conio.h> is a header provided primarily by extremely old MS-DOS C compilers, such as Turbo C. It is not available on Linux systems.

As noted by Andy M, you may need to install ncurses development packages to make <ncurses.h> available.