$ tar xvf sl.tar $ cd sl $ make cc -O -o sl sl.c -lcurses -ltermcap sl.c: In function `my_mvaddstr': sl.c:45: `OK' undeclared (first use this function) sl.c:45: (Each undeclared identifier is reported only once sl.c:45: for each function it appears in.) sl.c: In function `add_sl': sl.c:128: `OK' undeclared (first use this function) sl.c: In function `add_D51': sl.c:169: `OK' undeclared (first use this function) make: *** [sl] Error 1 |
#if 0 #define OK (1) /* Success return. */ #endif |
#define OK (1) |
$ make $ su # cp sl /usr/local/bin |
$ tar xvf sl.tar $ cd sl |
CC=cc CFLAGS=-O -I/usr/include/ncurses ~~~~~~~~~~~~~~~~~~~~~~追加 sl: sl.c sl.h $(CC) $(CFLAGS) -o sl sl.c -lncurses -ltermcap ~追加 # $(CC) $(CFLAGS) -o sl sl.c -lcurses |
$ make $ su # cp sl /usr/local/bin |