Fw: Lua in c++ doesn't work?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fw: Lua in c++ doesn't work?

Bram Vaessen
Trying again to send this mail (outlook keeps sending it to owner-lua-l!!!)


----- Original Message -----
From: "Bram Vaessen" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, September 05, 2002 1:22 AM
Subject: Lua in c++ doesn't work?


> Hi, I tried calling lua functions in my C++ program and compile it with
> gcc... (I use .cpp extension)
> But then I get the following errors:
>
> /tmp/ccEU0sMk.o: In function `startScript(void)':
> /tmp/ccEU0sMk.o(.text+0x1c): undefined reference to `lua_open(int)'
> /tmp/ccEU0sMk.o(.text+0x39): undefined reference to `lua_dofile(lua_State
*,
> char const *)'
> /tmp/ccEU0sMk.o(.text+0x4f): undefined reference to
`lua_getglobal(lua_State
> *, char const *)'
> /tmp/ccEU0sMk.o(.text+0x63): undefined reference to `lua_gettop(lua_State
> *)'
> /tmp/ccEU0sMk.o(.text+0x74): undefined reference to
`lua_tonumber(lua_State
> *, int)'
>
> If I rename my file with lua commands to script.c there is no problem
>
> Isn't there a way to use lua in c++ ? My whole prog is written in C++ so I
> would like to use that...
>
> thanks,
>
> Bram Vaessen
>