Using LuaXML in a .love file

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
YuShin
Prole
Posts: 11
Joined: Mon Oct 18, 2010 10:05 am

Using LuaXML in a .love file

Post by YuShin »

Hi,

I am trying to deal with an XML file in my love program.
I use LuaXML an it works fine, though i have to add a lua.exe in the game directory, which i suppose makes it windows-only, or at least require the user to have Lua installed on other platforms.

My problem is that when i try to build the .love file, it fails to find 'LuaXML_lib', but there is LuaXML_lib.c, .dll and .so in the file.

This thread suggests using love.filesystem.require(), but since I can't find it in the wiki i suppose it has been deleted.

Has anyone else encoutered this problem?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Using LuaXML in a .love file

Post by bartbes »

love.filesystem.require has been superseded by require. (It allows for custom loaders.) Furthermore, love's loader doesn't (and can't) support loading binaries. Unfortunately this means that distributing c modules is near-impossible when not providing stand-alone binaries.
User avatar
leiradel
Party member
Posts: 184
Joined: Thu Mar 11, 2010 3:40 am
Location: Lisbon, Portugal

Re: Using LuaXML in a .love file

Post by leiradel »

You can try one of the Lua-only XML parsers available at http://lua-users.org/wiki/LuaXml.

Cheers,

Andre
YuShin
Prole
Posts: 11
Joined: Mon Oct 18, 2010 10:05 am

Re: Using LuaXML in a .love file

Post by YuShin »

That's what i'm doing now :) , yet they have less features :( .

Thank you for your answers.
User avatar
ejmr
Party member
Posts: 302
Joined: Fri Jun 01, 2012 7:45 am
Location: South Carolina, U.S.A.
Contact:

Re: Using LuaXML in a .love file

Post by ejmr »

YuShin wrote:Hi,

I am trying to deal with an XML file in my love program.
I use LuaXML an it works fine, though i have to add a lua.exe in the game directory, which i suppose makes it windows-only, or at least require the user to have Lua installed on other platforms.

My problem is that when i try to build the .love file, it fails to find 'LuaXML_lib', but there is LuaXML_lib.c, .dll and .so in the file.

This thread suggests using love.filesystem.require(), but since I can't find it in the wiki i suppose it has been deleted.

Has anyone else encoutered this problem?
A friend of mine encountered this on his Windows computer; I am doing my portion of development on Linux and did not run into any problems, but he consistently had trouble loading LuaXML.dll. Ultimately it turned out the problem was caused by him using a 64-bit version of Lua while the library was not compiled for that. Installing the 32-bit version of LOVE fixed the problem for him and now he can use it without any problems.
ejmr :: Programming and Game-Dev Blog, GitHub
南無妙法蓮華經
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Using LuaXML in a .love file

Post by coffee »

Advanced Tiled Loader uses LuaXML. Kadoba should be familiar enough with it for help you.
viewtopic.php?f=5&t=2567
User avatar
Kadoba
Party member
Posts: 399
Joined: Mon Jan 10, 2011 8:25 am
Location: Oklahoma

Re: Using LuaXML in a .love file

Post by Kadoba »

Advanced Tiled Loader uses the pure lua version and I don't have any experience with the C-binding one. I can't really help, sorry. :(
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Using LuaXML in a .love file

Post by coffee »

Kadoba wrote:Advanced Tiled Loader uses the pure lua version and I don't have any experience with the C-binding one. I can't really help, sorry. :(
Oh sorry about the confusion. I was mislead by your header in external/xml.

Code: Select all

-- XML parser from http://lua-users.org/wiki/LuaXml
Not same library, probably a lot more of XML/Lua combos libs have that (obvious) name.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests