lua-users home
lua-l archive

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


On Sun, Nov 2, 2008 at 12:27 PM, Etherous <etherous@gmail.com> wrote:
> I'm running Mac OS 10.5.5 and Using Xcode 3.1.1 and Lua 5.1.4. I'm trying to
> embed Lua into my C++ application. When I build it, at the linker stage I
> get the following errors:
>   "lua_pcall(lua_State*, int, int, int)", referenced from:
>       vConsole::run()     in main.o

My best guess: you need
  extern "C" {
    ...
  }
around your #include of "lua.h", as your lua library has been compiled
as C, not C++.  (Or you could recompile it as C++, if you prefer.)

-- James