A Scripting Language Interface to C++ Libraries

Harald Winroth
Computational Vision and Active Perception Laboratory (CVAP)
Royal Institute of Technology, S-100 44 Stockholm, Sweden


In this paper we discuss how to generate wrapper code that allows existing C++ class libraries to be accessed from scripting languages such as Tcl and Perl. Previously suggested approaches to this problem are reviewed and compared. We point out some problems related to the C++ object model and the difficulties introduced by advanced C++ constructs such as templates, nested types, type definitions, temporaries, implicit casts, multiple inheritance and overloading. We argue that it is necessary to support all of these features, as they are used frequently in all modern C++ libraries. A new system called TIDE, which integrates C++ and Tcl, is presented and we describe the ideas behind its design. As an example, we show how TIDE can be used for accessing the ISO C++ draft standard library.

Harald Winroth (harald@nada.kth.se)