lua-users home
lua-l archive

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


I think it's a link error. I've got a HelloWorld-program for using Lua/C at:

http://members.home.nl/joeijoei/parrot/Hello_Lua

Good luck,
Klaas-Jan
----- Original Message -----
From: "Johannes Hager" <hager.j@gmx.de>
To: <lua@bazar2.conectiva.com.br>
Sent: Tuesday, June 10, 2003 6:43 PM
Subject: Using Lua in a C program


> Hi,
>
> At first sorry for my bad Englisch. I going to use Lua in a C Project but
it
> doesnt work with my gcc. I have downloaded the Lua sources from
www.lua.org
> and installed with help of the install file. The interpreter works but if
i
> try to write a example like that:
>
> #include <lua.h>
>
> int main(void){
>     lua_State *L;
>     L = lua_open();
>     lua_close(L);
>     return 0;
> }
>
> comes this:
>
> /tmp/ccV9wgqi.o(.text+0x11): In function `main':
> : undefined reference to `lua_open()'
> /tmp/ccV9wgqi.o(.text+0x1f): In function `main':
> : undefined reference to `lua_close(lua_State*)'
> /tmp/ccV9wgqi.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'
> collect2: ld returned 1 exit status
>
> I thing thats a linker error. Anyone a idea?
>
> Thanks for your help
> Cu
>
>
>
>