Add missing index_tuple.hpp header.
[luabind.git] / doc / building.rst
blob7684e730f4dd5f06013e52038c4a86c4c962f345
1 Building luabind
2 ================
4 Prerequisites
5 -------------
7 Luabind depends on a number of Boost 1.34 libraries. It also depends on
8 Boost Jam and Boost Build V2 to build the library and run the tests.
9 Boost provides `precompiled bjam binaries`__ for a number of platforms.
10 If there isn't a precompiled binary available for your platform, you may
11 need to `build it yourself`__.
13 __ http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941
14 __ http://www.boost.org/doc/libs/1_36_0/doc/html/jam/building.html
17 Windows
18 -------
20 The environment varaible ``LUA_PATH`` needs to be set to point to a
21 directory containing the Lua include directory and built libraries. At
22 least for the purpose of running the test suite, the recommended way to
23 get these is the `Lua Binaries`_ *Windows x86 DLL and Includes* package.
25 Furthermore, the environment variable ``BOOST_ROOT`` must point to
26 a Boost installation directory.
28 .. _`Lua Binaries`: http://luabinaries.luaforge.net
31 Linux and other \*nix flavors
32 -----------------------------
34 If your system already has Lua installed, it is very likely that the
35 build system will automatically find it and just work. If you have
36 Lua installed in a non-standard location, you may need to set
37 ``LUA_PATH`` to point to the installation prefix.
39 ``BOOST_ROOT`` can be set to a Boost installation directory. If left
40 unset, the build system will try to use boost headers from the standard
41 include path.
43 MacOSX
44 ~~~~~~
46 If you have both the 10.4 and 10.5 SDK installed, Boost Build seems to
47 default to 10.4. Lua, at least when installed from MacPorts, will be
48 linked with the 10.5 SDK. If the luabind build fails with link errors,
49 you may need to explicitly build with the 10.5 SDK::
51   $ bjam macosx-version=10.5
54 Building and testing
55 --------------------
57 Building the default variant of the library, which is a shared debug
58 library, is simply done by invoking ``bjam`` in the luabind root
59 directory::
61   $ bjam
62   ...patience...
63   ...found 714 targets...
64   ...updating 23 targets...
66 When building with GCC on Linux, this results in::
68   bin/gcc-4.2.3/debug/libluabind.so
70 On Windows a dll and matching import library would be produced.
72 To run the unit tests, invoke ``bjam`` with the ``test`` target::
74   $ bjam test
76 This will build and run the unit tests in four different variants:
77 debug, release, debug-static-lib, release-static-lib. A clean test run
78 output should end with something like:
80 .. parsed-literal::
82   ... updated *xxx* targets...
84 A failed run would end with something like:
86 .. parsed-literal::
88   ...failed updating *xxx* target...
89   ...skipped *xxx* targets...
91 If you are not using Boost Build to build your application, and want to
92 use the shared library variant, ``LUABIND_DYNAMIC_LINK`` needs to be
93 defined to properly import symbols.