I am working on this tutorial on building your own LISP (http://www.buildyourownlisp.com/chapter4_interactive_prompt) and for some reason when I try to compile I get this:
I'm on El Capitan,
Remove #include <editline/history.h>
,
and use cc -std=c99 -Wall test.c -ledit -o test
works for me.
Add the flag -ledit
before the output flad, it's a linking process, allows the compiler to directly embed calls to editline in your program. Or, you'll get the below error message,
Undefined symbols for architecture x86_64:
"_add_history", referenced from:
_main in prompt-086f90.o
"_readline", referenced from:
_main in prompt-086f90.o
ld: symbol(s) not found for architecture x86_64
I'm on OSX Mavericks and removing the line worked for me:
#include <editline/history.h>