lua-users home
lua-l archive

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


On Tue, Oct 15, 2013 at 6:48 PM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Tue, Oct 15, 2013 at 5:18 PM, Chris Datfung <chris.datfung@gmail.com> wrote:
> gcc -o LuaXML_lib.so -fPIC -shared LuaXML_lib.o -L. -L../lua/src  -llua -ldl
> /usr/bin/ld: cannot find -llua

For a Lua extension, you should not need to link explicitly against
liblua. It will find all it needs when loaded by Lua (or not).


Thanks, when I load luaxml, lua complains that its missing the LuaXML_lib.lua file, but I don't see that file in the zip package:
root@lab:/usr/local/src/luaxml# ls
lua51.dll  LuaXml.cdr    LuaXML_lib.dll  LuaXml.lua  Makefile    test.lua
lua.exe    LuaXML_lib.c  LuaXML_lib.o    LuaXml.png  readme.txt  test.xml
root@lab:/usr/local/src/luaxml# lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> xml = require("LuaXml")
./LuaXml.lua:1: module 'LuaXML_lib' not found:
        no field package.preload['LuaXML_lib']
        no file './LuaXML_lib.lua'
        no file '/usr/local/share/lua/5.1/LuaXML_lib.lua'
        no file '/usr/local/share/lua/5.1/LuaXML_lib/init.lua'
        no file '/usr/local/lib/lua/5.1/LuaXML_lib.lua'
        no file '/usr/local/lib/lua/5.1/LuaXML_lib/init.lua'
        no file '/usr/share/lua/5.1/LuaXML_lib.lua'
        no file '/usr/share/lua/5.1/LuaXML_lib/init.lua'
        no file './LuaXML_lib.so'
        no file '/usr/local/lib/lua/5.1/LuaXML_lib.so'
        no file '/usr/lib/x86_64-linux-gnu/lua/5.1/LuaXML_lib.so'
        no file '/usr/lib/lua/5.1/LuaXML_lib.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
 
What am I missing?

thanks,
Chris