Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

term.h : header not found

Tags:

c

linux

unix

I have a little piece of code for linux terminal capabilities, it uses the term.h header file

#include <stdio.h>
#include <term.h>
#include <curses.h>
#include <stdlib.h>

main()
{
      setupterm("unlisted",fileno(stdout),(int*)0); 
      printf("Done.\n");
}

but when I try to compile it I get fatal error: term.h : No such file or directory

What should I do? Where's the problem

like image 641
lychee Avatar asked Sep 18 '14 19:09

lychee


1 Answers

On Ubuntu, download and install the libncurses5-dev:

sudo apt-get install libncurses5-dev

then compile:

gcc my_program.c -o my_program -lncurses
like image 148
Canatto Filipe Avatar answered Oct 19 '22 07:10

Canatto Filipe