|
i have tried it with extern c but still i get the same failed output > Date: Sun, 20 Jun 2010 13:36:45 +0100 > Subject: Re: embedding lua with c > From: lua@corsix.org > To: lua@bazar2.conectiva.com.br > > 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> > } Hotmail: Powerful Free email with security by Microsoft. Get it now. |