I noticed my program doesn't build on another distro. I have -lncurses on makefile CFLAGS but get "undefined reference to `initscr'" errors.
Here is the makefile:
CFLAGS+=-std=c99 -pedantic -Wall -lncurses
BIN=progname
all: $(BIN)
install: all
mkdir -p $(DESTDIR)/usr/bin
install -m 755 $(BIN) $(DESTDIR)/usr/bin/
uninstall:
rm -f $(DESTDIR)/usr/bin/$(BIN)
clean:
rm -f $(BIN)
Here is the cc command:
cc -std=c99 -pedantic -Wall -lncurses nbwmon.c -o nbwmon
If i move -lncurses last it builds fine:
cc -std=c99 -pedantic -Wall nbwmon.c -o nbwmon -lncurses
So how can i fix this? How can i move -lncurses directive last on makefile?