$ gcc -o autott autott.c -lncurses
/tmp/cciOHP4W.o: In function main':
autott.c:(.text+0xa): undefined reference to
initsrc'
collect2: error: ld returned 1 exit status
I have installed ncurses, but it still return this error. Why?
$ gcc -o autott autott.c -lncurses
/tmp/cciOHP4W.o: In function main':
autott.c:(.text+0xa): undefined reference to
initsrc'
collect2: error: ld returned 1 exit status
I have installed ncurses, but it still return this error. Why?
The initialization function is named initscr
, not initsrc
.
(You might also have forgotten to list the library when linking, e.g., -lncurses
).