Can I write a C++ code that can be compiled and used for extending TCL (I don’t mean calling an executable file)? Can I describe some classes, functions and use them for in my TCl code by calling the compiled (.so or .a file) C++ code? If yes, then please explain me schematically how it is being done.
Share
http://cpptcl.sourceforge.net/ It is a C++ wrapper of Tcl C API and very convenient to use, well documented. I tell this from my personal experience.
C++/Tcl is a library that allows to easily integrate C++ and Tcl.
If you write programs in both languages, you will find it to be extremely helpful.
The C++/Tcl library was inspired by the Boost.Python library and was designed to provide a similar interface.
Currently, the C++/Tcl library offers the following features:
Support for both extending Tcl with C++ modules and embedding Tcl in C++ applications.
Possibility to expose free C++ functions as commands in Tcl.
Possibility to define classes and class member functions, visible in Tcl in the style similar to SWIG wrappers.
Possibility to manipulate Tcl lists and objects from the C++ code.