# tolua++ - Home

news - download - documentation - installing - contact - lua_qt - Codenix

tolua++ is an extended version of tolua, a tool to integrate C/C++ code with Lua. tolua++ includes new features oriented to c++ such as:

- Support for std::string as a basic type (this can be turned off by a command line option).
- Support for class templates

As well as other features and bugfixes.

### News:

15/02/09: Version 1.0.93 released. Some bugfixes and new features:

- Build process bootstraps.
- Added hooks to handle custom types.
- Added hooks to handle exceptions.
- Fixed issues with newer GCC compilers.
- Changed to MIT license. See COPYRIGHT file for details.

27/04/06: Version 1.0.92 released. Some bugfixes and new features:

- Fixed garbage collector bug for C objects.
- Fixed problems with C compilers (including microsoft's)
- Added a .proj file to build with Visual Studio 7 (contributed by Makoto Hamanaka).
- New command line option: `-E` to define extra values
- New command line option: `-t` to associate C++ types with their lua names (see the manual for details)

25/02/06: Version 1.0.91 released. This version contains a small garbage collection bugfix for 1.0.90 (thanks to Rolf E. Thorup for the report), everyone should upgrade.

18/02/06: Version 1.0.90 released. Some bugfixes and new features:

- lua 5.1 support (see `README-5.1`)
- Support for casting operators (for example `operator const char();`)
- New utility functions, `tolua.setpeer` and `tolua.getpeer`, for easier (and faster) inheritance from C/C++ objects (only for lua 5.1)
- Some small API changes (see the compatibility section of the manual)

18/10/05: Version 1.0.7 released. Some bugfixes and new features:

- New command line option: -C, to disable the cleanup of included lua code (for easier debugging).
- Merged Mildred's patch: embedded lua chunks have better names, code on package initializer function is nested.
- New hook: `parser_hook`, allows modifications to the behavior of the main parser.
- Objects can be private (or protected). This doesn't affect the normal usage (everything is public by default), but it's useful to declare types that don't export any code, but serve as 'support' for other declarations.
- Misc bugfixes.

01/9/05: Version 1.0.6 released. Several bugfixes and new features:

- Classes can have properties, using the 'tolua_property' keyboard. Property types are customizable.
- Added a command line flag -D, to disable automatic generation of destructors for all classes with constructors (for compatibility with tolua5)
- Classes with protected or private destructors can be tagged individually using the "TOLUA_PROTECTED_DESTRUCTOR" macro.
- Added utility function "tolua.inherit", to allow a lua table to "inherit" from an instance of a C/C++ class
- Fixed class constructor bug (it is now possible to use 'ClassName()' to create a lua-owned instance of the class without problems)
- Misc bugfixes.

10/4/05: Version 1.0.5 released. This version contains some minor bugfixes and a new feature, the tolua_outside keyword, used to specify regular functions as methods of classes or structs. This release is also paired with lua_qt version 0.0.1a.

1/2/05: version 1.0.4 released. This version contains some bugfixes and new features:

- Ability to customize tolua++'s behaviour to add functionality.
- Basic support for multiple inheritance.
- Several bugfixes on the parser.
- Debian package available for download.

Most of the changes on this version were added for lua_qt, a package to bind the Qt toolkit to lua.

20/9/04: version 1.0.3 released. This version contains major bugfixes:

- Fixed bugs in object tracking (the 'memory address' bug; there's still some work left, but people should be able to use `union`s with no problems)
- Fixed parser bugs, functions with template parameters should work, also functions with default parameters that call constructos and with commas on them should work.
- Added a `__call` method for class names, to replace `new_local` to create instances owned by lua.
- Fixed other minor bugs.
- Removed the link to win32 binaries, since I aparently don't know what the hell I'm doing with a microsoft compiler ;-)

Everyone should upgrade.

23/10/03: version 1.0.2 released. This version contains major bugfixes:

- Fixed bugs in gargabe collection (thanks to Christian Vogler for doing all the work :-)
- `namespace`s and nested types are now fully supported.
- Fixed other minor bugs.

Everyone should upgrade.

### Downloading

The latest development version of the code is available through SVN from tolua++'s BerliOS project page. You can checkout using: svn checkout svn://svn.berlios.de/toluapp/trunk The tolua++ source is freely available by http. The software provided under the terms of the MIT license. See the COPYRIGHT file distributed with the source.

Current version is 1.0.93, older versions:

- tolua++-1.0.93.tar.bz2
- tolua++-1.0.92.tar.bz2
- tolua++-1.0.91.tar.bz2
- tolua++_1.0.7-1.tar.gz [deb]
- tolua++_1.0.6-1.tar.gz [deb]
- tolua++_1.0.5-1.tar.gz [deb]
- tolua++-1.0.4.tar.bz2 [deb]
- tolua++-1.0.3.tar.bz2
- tolua++-1.0.2.tar.bz2
- tolua++-1.0.tar.bz2

  ### Documentation

  You can find the manual here or under the doc/ directory on the distribution.

  I'll also be adding interesting addons/examples to my page on the lua-users wiki.

  ### Instalation

  tolua++ uses SCons to build. SCons is based on python, you can get a stand-alone version on their website. After you have SCons, follow this simple instructions:

- Type 'scons all' to compile.
- Type 'scons install'. The default install prefix is /usr/local, so if you are on a POSIX system, it should work. On other systems, you can change it with the 'prefix' option on command line.

  scons prefix=/usr install

  or on windows

  scons "prefix=c:\Program Files\Visual C" install

  Use scons -h to see a list of available command line options.

  The files you need (in case you want to do a manual install) are:

  - bin/tolua++[.exe] - the main binary
  - include/tolua++.h - the header file
  - lib/libtolua++.a or lib/tolua++.lib - the library
- See INSTALL for instructions on how to install without SCons. There are also instructions on how to build without scons at the lua-users wiki (if you know the author of this, contact me)
- For lua 5.1, see `README-5.1`

  tolua++ and this website are maintained by Ariel Manzur.
  Contact us with any bugs, fixes, suggestions, or questions about this package.