lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 16 Aug 2013, at 10:41, Dimitris Papavasiliou wrote:

> This may be caused by not defining HAVE_WORDEXP for instance by adding -DHAVE_WORDEXP to the compilation line.  This define is needed to let the compiler know that it's on a POSIX system and wordexp, a library for performing shell-style expansions on strings, is available.  Without it history paths like "~/.myhistory" won't work and you'll have to use "/home/username/.myhistory" instead.  Apart from that only a call to luap_sethistory should be necessary.

I hadn't defined HAVE_READLINE_HISTORY, and HAVE_READLINE_HISTORY_H. Without those defines it wasn't working. I'm not too bothered about having the history saved to a file, I just wanted the up arrow key to work which it does now. I didn't need to call luap_sethistory.

> except renaming the header files to end in hpp.  This isn't necessary, is it?

No, the patch was generated off the version I embedded hence the extra #defines and the filename changes. In the past I've experienced problems linking C and C++ code, and although it can be made to work, life is much easier when everything is compiled as C++.

Thanks,
Kevin.