¶ Available Source Code Locations
The guides below give more specific recommendations but here is a list of the available source code locations.
- http://hg.kervala.net/packaging/file (This is luabind with cmake but without the need of using bjam)
- http://sunet.dl.sourceforge.net/project/luabind/luabind/0.9/luabind-0.9.tar.gz (Legacy version that uses bjam)
- https://bitbucket.org/rti/ryzom-core-luabind/src
¶ Installing Luabind on Mac OS X
Since luabind is not available from macports you need to install it separately. Here follows a short summary of how to install luabind on Mac OS X.
¶ Downloading the source code
hg clone http://hg.kervala.net/luabind
hg clone http://hg.kervala.net/cmake
export CMAKE_MODULE_PATH=$(pwd)/cmake/modules
¶ Building the source code
Be sure to build a static library. Strange errors might occur otherwise. (see #1212)
This is done in cmake with the switch WITH_STATIC set to ON (see below).
Open a terminal and write the following lines, assuming you downloaded the file as described above:
cd luabind
mkdir build
cd build
cmake -DWITH_SHARED=OFF -DWITH_STATIC=ON -G "Unix Makefiles" ..
make
¶ Installing the binaries
sudo make install
When the command has executed successfully the installation is complete.
¶ Installing Luabind on Linux...
Certain Linux Distributions does not provide luabind so here follows a short summary how to install luabind on a Unix like system.
¶ Installing lua
To build luabind, you need liblua. Install it:
sudo port install lua
On Ubuntu 10.04:
sudo apt-get install liblua5.1-0-dev
On CentOS 5+
yum install lua-devel
¶ Getting the source
While writing this, the most current version is 0.9. Get it!
On Linux:
wget http://sunet.dl.sourceforge.net/project/luabind/luabind/0.9/luabind-0.9.tar.gz
Alternativly, you can take the source on Kervala's repository
http://hg.kervala.net/packaging/file/
Here is a clone on bitbucket:
hg clone https://bitbucket.org/rti/ryzom-core-luabind
That version includes a cmake config and allows to build a debian package.
¶ Extract the source
tar zxf luabind-0.9.tar.gz
¶ Building and installing
¶ All CMake platforms
If you downloaded sources from http://hg.kervala.net/packaging/file/ or https://bitbucket.org/rti/ryzom-core-luabind/src, you just need to type
cd luabind
mkdir build
cd build
cmake ..
# with STLport, append: -DWITH_STLPORT=ON
# in static, append: -DWITH_STATIC=ON
make
sudo make install
¶ On Ubuntu 10.04
install boost build:
sudo apt-get install boost-build libboost-dev
and compile / install with the following command:
sudo bjam --prefix=/usr/local install
¶ On Gentoo
if boost-build package is not installed:
sudo emerge boost-build -av
and compile /install with the following command: (replace 1_41 by your version of bjam)
sudo bjam-1_41 --prefix=/usr/local install
check if lib is named correctly.
ls /usr/local/lib/libluabind*.so
if lib is named libluabindd.so create a symlink
sudo ln -s /usr/local/lib/libluabindd.so /usr/local/lib/libluabind.so