lua-users home
lua-l archive

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


2010/6/20 RAN GREENBERG <ran_greenberg@hotmail.com>:
> #include <lua.h>
> #include <lualib.h>
> #include <lauxlib.h>
> ...
> when compiling with the command
> gcc -llua test.cpp
>

If Lua is compiled as C code (which it most likely is) then when
compiling C++ code, you have to include it as C code by doing:
extern "C" {
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
}