"undefined reference to" 컴파일 오류가 나네요...

midasyoo의 이미지

#include <curses.h>

main()
{
WINDOW *win;
win = newwin(5,20,0,0);
box(win,'|','-');
}

위와 같은 짧은 코드를 실행하려고 다음과 같이 컴파일을 했습니다.

cc -o wincon wincon.c

그랬더니, 아래와 같은 에러 메시지가 뜨네요.

어떻게 해야 하나요?

/tmp/cc8ZlHpM.o: In function `main':
/tmp/cc8ZlHpM.o(.text+0xf): undefined reference to `newwin'
/tmp/cc8ZlHpM.o(.text+0x32): undefined reference to `wborder'
collect2: ld returned 1 exit status

잘 몰라서 그러는데, 좀 도와주세요...

고수님들께 미리 감사드립니다...

맹고이의 이미지

Quote:
cc -o wincon wincon.c -lcurses

이렇게 사용한다던데...
curses 라이브러리를 써본적은 없지만
검색 조금만 하면 나오더군요.