lua-users home
lua-l archive

Re: Advice request to build C functions in a library for Lua5.1

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


FAO Alex
Yes, thank you I had already removed -llua and -llualib after consulting
http://lua-users.org/wiki/BuildingModules
however I did not obtain any advantage and so left them in. The error remained.
I accept that doing this results in a much tighter library with a smaller footprint and thank you for your advice.
Currently I still experience a failure using require with a reported failure to index.
Thanks
C


Alex Queiroz <asandroq@gmail.com> wrote:
Hallo,

On 10/25/07, Crystal Jewels wrote:
>
> // compile as:
> // gcc mylib.c -shared -L/usr/local/lua5.1/lib -I/usr/local/lua5.1/include
> // -llua -llualib -lm -ldl -o mylib.so
>

You should not link your extensions with the Lua library.
Instead, link the Lua interpreter in way that makes it exports its
symbols.

Cheers,
--
-alex
http://www.ventonegro.org/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


AltStyle によって変換されたページ (->オリジナル) /