Re:Learn C and build your own Lisp
by skittles on Friday April 04, 2014 @12:35PM
(#7532552)
Anyone know why clang on mac os x doesn't know about edit/history.h? The line editing portion of the book requires it.
[ Parent
| on HN ]
You can try to install with MacPorts Readline with terminal command: sudo portu install readline
And after that you include with #include <readline/read line.h> #include <readline/history.h>
That would be for libedit: http://thrysoee.dk/editline/
Re:Learn C and build your own Lisp
by jdstraughan on Friday April 04, 2014 @07:03PM
(#7535012)
I've installed this, but I still get this error:
fatal error: 'editline/history.h' file not found
Any advice would be greatly appreciated.
Are you using Mavericks? You need to import the library using #include <histedit.h>.
Other problem is that the code won't work with this library. You need to rework it using the following example: http://www.cs.utah.edu/~bigler/code/libedit.html
There's a lot more to set up and tear down when using the Mavericks' editline; it's not so user-friendly for a beginner as the code in the example.