Lakshmi Ganesh <
lakshmiganes...@gmail.com> wrote:
> Hello All,
>
> I am relatively new to TCL, the topic I am exploring is that I would
> like to see whether we can call the methods from my custom c ++
> library in TCL scripts. Is there any command available in TCL to
> call the method from external C ++ library. I am assuming this
> library has to be put along with the other TCL libraries.
Tcl does not have a native foreign function interface.
The traditional way to do this is to write a small amount of C (or in
your case C++) glue to provide that interface between scripts and C (or
C++) functions.
However, there is a FFI extension:
https://wiki.tcl-lang.org/page/Ffidl
The wiki page does say the last update was 2018, so your mileage may
vary with it. The page also links to a couple other extensions.