我有这个代码:
#include <stdio.h>
#include <termcap.h>
#include <stdlib.h>
int main() {
char *termtype = getenv("TERM");
int li = tgetnum("li");
printf("%d", li);
return 0;
}
我无法编译它,因为我得到了
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)
为什么会这样?
macOS 卡塔利娜