lua-users home
lua-l archive

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


Hello,
 
I think I found the problem.  It was a with the linker.  I am using Lua in a C++ app, and the lualibs.h header does not like to be linked in to C++ as it is.  I changed:
 
#ifndef LUALIB_API
#define LUALIB_API extern
#endif

to:

#ifndef LUALIB_API
#ifdef __cplusplus
#define LUALIB_API extern "C"
#elif
#define LUALIB_API extern
#endif
#endif
 
This allows it to automatically like properly from C++ as well as from C.
 
Agradecimentos. 8)
--Jens
 
----- Original Message -----
From: "Roberto Ierusalimschy" <roberto@inf.puc-rio.br>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Monday, July 09, 2001 2:57 PM
Subject: Re: problems lua_baselibopen

> > Lua complains that there is an error in the Main part of the chunk.
>
> What exactly is the complain? Which version of Lua you are running?
>
> -- Roberto
>