Error including library using Linux

Asked

Viewed 279 times

1

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

I read in the Soen and it was suggested just this curses. h, which I get an error. Why this happens and which library should I use to manipulate bufferized files using Linux (Fedora 23)?

2 answers

5


conio.h and io.h are libraries commonly 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 great reasons, never rely on platform-specific extensions.

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

In Fedora, try it sudo yum install ncurses-devel.

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 file. h(http://www.wence.vandermeersch.org/gconio/gconio.h).

Put 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>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.