1

I'm trying to build cliclock on ubuntu 16.04 LTS when I had this error

~/Git/cliclock on  master took 7s 
➜ make
build clock.c
CC -Wall -lcurses clock.c
clock.c:17:21: fatal error: ncurses.h: No such file or directory
compilation terminated.
Makefile:11: recipe for target 'cli-clock' failed
make: *** [cli-clock] Error 1

I managed to fix this by installing libncurses5-dev but then this

~/Git/cliclock on  master took 5s 
➜ make
build clock.c
CC -Wall -lcurses clock.c
/tmp/cch1W8PI.o: In function `init':
clock.c:(.text+0x2a): undefined reference to `initscr'
clock.c:(.text+0x2f): undefined reference to `cbreak'
clock.c:(.text+0x34): undefined reference to `noecho'
clock.c:(.text+0xe95): undefined reference to `wmove'
clock.c:(.text+0xeb7): undefined reference to `waddnstr'
clock.c:(.text+0xed5): undefined reference to `wmove'
clock.c:(.text+0xef7): undefined reference to `waddnstr'
/tmp/cch1W8PI.o: In function `clock_move':
clock.c:(.text+0xf3d): undefined reference to `mvwin'
/tmp/cch1W8PI.o: In function `key_event':
clock.c:(.text+0x1091): undefined reference to `stdscr'
clock.c:(.text+0x1099): undefined reference to `wgetch'
/tmp/cch1W8PI.o: In function `main':
clock.c:(.text+0x12ed): undefined reference to `endwin'
collect2: error: ld returned 1 exit status
Makefile:11: recipe for target 'cli-clock' failed
make: *** [cli-clock] Error 1

I'm new to this language. Is this something to do with dependencies or is there something wrong in the clock.c file?

AlKaef
  • 11
  • 1

0 Answers0