0

I have this code:

#include <stdio.h>
#include <termcap.h>
#include <stdlib.h>

int main() {
    char *termtype = getenv("TERM");
    int li = tgetnum("li");
    printf("%d", li);
    return 0;
}

I can't compile it because I get

    Undefined symbols for architecture x86_64:
      "_tgetnum", referenced from:
          _main in main-11560e.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

Why is it happening?
MacOS Catalina

0 Answers0