[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Trouble enabling loadlib
- From: Peter Cawley <lua@...>
- Date: Mon, 23 Feb 2009 23:41:33 +0000
In Lua 5.1, loadlib is no longer a global function;
* require IS a global function
* loadlib, etc. are now found within the package namespace
(package.loadlib, etc.)
On Mon, Feb 23, 2009 at 11:25 PM, Daniel Ng <daniel_ng11@lycos.com> wrote:
> Hi,
>
> I'm running lua 5.1.3 on a Linux 2.6 uClibc system.
>
> After reading this-
>
> http://www.lua.org/pil/8.2.html#C-packages
>
> -I tried the suggestions contained in the above document to test if loadlib()
> works-
>
> Lua 5.1.3 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> print(loadlib())
> stdin:1: attempt to call global 'loadlib' (a nil value)
> stack traceback:
> stdin:1: in main chunk
> [C]: ?
>
> -so I assume loadlib() is not enabled in my lua binary.
>
> How do I get it enabled? So far, here are my build variables:
>
> OBJCOPY=powerpc-linux-uclibc-objcopy
> MYCFLAGS="-DLUA_USE_LINUX -DLUA_USE_DLOPEN"
> MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
> AR="powerpc-linux-uclibc-ar rcu"
>
> Previous posts have suggested using '-ldl' and '-DLUA_USE_DLOPEN' but as you
> can see I have already specified those.
>
> Cheers,
> Daniel
>
>