[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: embedding lua with c
- From: Peter Cawley <lua@...>
- Date: Sun, 20 Jun 2010 13:36:45 +0100
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>
}