Compiling LuaXML for 64-bit Linux

This short post explains how to compile LuaXML for 64-bit Linux systems, particularly those running Ubuntu or anything related. The game I’m working on uses LuaXML but when I recently began development on a new laptop I found the library we were using no longer worked, as it was not compiled for 64-bit. So here’s some simple steps to remedy that problem.

  1. Download LuaXML. I used this version since I’m developing a game using LÖVE. If you use this instead you’ll have to change a few packages below.

  2. Run sudo apt-get install liblua5.1.0-dev or liblua5.2-dev, depending on the version of LuaXML you download.

  3. Open the Makefile for LuaXML and add the following variable definitions:

    INCDIR = -I/usr/include/lua5.1    # Or /usr/include/lua5.2
    LIBDIR = -L. -L/usr/lib/x86_64-linux-gnu
    
    # Under "generic platform specific rules
    LIBS = $(LIBDIR) $(LIB) -llua5.1 -ldl    # Or -llua5.2

Now you can run make and get a working LuaXML_lib.so for your system.

Advertisements

Add Your Thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s