lua-users home
lua-l archive

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

Thanks for your quick answers!! It works now... finally It's 01:39 am :S

----- Original Message -----
From: "Christian Vogler" <>
To: "Multiple recipients of list" <>
Sent: Thursday, September 05, 2002 1:30 AM
Subject: Re: Lua in c++ doesn't work?

> On Thu, Sep 05, 2002 at 01:22:30AM +0200, Bram Vaessen wrote:
> > Isn't there a way to use lua in c++ ? My whole prog is written in C++ so
> > would like to use that...
> Your linker thinks that the functions from the lua library are written
> in C++, and hence it looks for them in a form that includes all type
> information, but this information does not exist. You have to ensure
> that the compiler and the linker know that the lua library functions
> are compiled with a C compiler.
> To achieve this, you need to bracket your #include directives for the
> lua-related header files with 'extern "C"', like this:
> extern "C" {
> #inclue <lua.h>
> #include <lualib.h>
> }
> Regards
> - Christian