Error adding library using Linux

1

I'm just trying to compile examples from the book and get fatal error: No such file or directory when trying to include conio.h, io.h and curses .h .

I read in the SOen and it was suggested just this < i> curses.h , which I get error. Why does this happen and which library should I use to handle buffered files using Linux (Fedora 23)?

    
asked by anonymous 12.01.2016 / 23:01

2 answers

5

conio.h and io.h are libraries normally found in compilers for Windows. They are not part of ISO C. Therefore, it is natural that other platforms do not include it. Unless you have good reasons, never rely on the specific extensions of a platform.

Curses.h is available on Linux, but you must first install it. If you are using Ubuntu, use the sudo apt-get install libncurses5-dev command to install it.

In Fedora, try sudo yum install ncurses-devel .

    
12.01.2016 / 23:14
2

To complete the answer above me, if you really need to include all these libraries follow these steps:

Install ncurses and download the gconio.h file ( link ).

Place gconio.h in your INC_DIR or your project folder.

Finally use these includes

#include <ncurses.h>   
#include <gconio.h>//ou "gconio.h" depende da sua localização
#include <asm/io.h>
    
12.01.2016 / 23:30