lua-users home
lua-l archive

Re: MacOS X and 5.1: symbols not defined

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


I believe the Lua approach is 'right' in this issue. However, since almost the rest of the world is 'wrong' :) it seems like a losing battle. Could the lua.hpp be among the installed headers, that's what I think he means by the /usr/include reference.
-ak
28.3.2005 kello 22:22, David Jones kirjoitti:
On Mar 24, 2005, at 18:33, Glenn Maynard wrote:
On Thu, Mar 24, 2005 at 06:53:58AM -0300, Luiz Henrique de Figueiredo wrote:
Try adding
extern "C" { }
In 5.1 you can include lua.hpp, which will do this for you. It's in etc/.
If it's not in /usr/include by default, it's not useful--if it's not in
the includes that everyone has installed, I need to do it myself. Why
not just do this in .h files, like just about every other library? (I
can't think of any benefit to having a special header for this.)
Have you the question "Why isn't there an extern "C" block, required for C++, in the API header?" in the Lua FAQ at http://lua-users.org/wiki/LuaFaq ?
The answer is basically two-fold:
i) As a C library, Lua makes no special arrangements for access by foreign languages, including C++. ii) The Lua source is compilable as C++ and therefore using extern "C" would be inappropriate.
What has /usr/include got to do with this?
David Jones

AltStyle によって変換されたページ (->オリジナル) /