change that to -DHAVE_READLINE=1 . Also, per the example I cited, add a -lreadline and a -lncurses to the gcc invocation.