Installing Luabind and Linux, Mac OS X, ...¶
Since luabind is not available from macports (I think certain Linux Distributions do not provide it too), here the short summary how to install luabind on a Unix like system :)
To build luabind, you need liblua. Install it, for example on a Mac using macports:
sudo port install lua
Getting the source¶
While writing this, the most current version is 0.9. Get it!
Extract the source¶
tar zxf luabind-0.9.tar.gz
Since bjam might be annoying and complicated, use this small build script. Put it in the luabind root directory.
This script is configured for a Mac OS X having lua installed in /opt/local (using macports).
Please adjust LUA_INCLUDE_DIR, LUA_LIBRARY_DIR and LIB_EXTENSION if you have a different setup.
#!/bin/sh LUA_INCLUDE_DIR=/opt/local/include LUA_LIBRARY_DIR=/opt/local/lib LIB_EXTENSION=dylib rm -rf build mkdir -p build/src for i in src/*.cpp do gcc -I$LUA_INCLUDE_DIR -I. -fPIC -c $i -o build/$i.o done gcc -shared -o build/libluabind.$LIB_EXTENSION build/src/*.o \ -L$LUA_LIBRARY_DIR -lstdc++ -llua
To install the thing, just copy lib and header into the preferred path. For example:
sudo cp -r luabind /usr/local/include sudo cp build/libluabind.* /usr/local/lib
Hope that works for you.