37. Embedding Tcl

Embedding is the practice of using Tcl from within an existing application written in C. This chapter explains how to add Tcl to your application, as well as how to create new tclsh-style applications.

37.1 Functions Presented in This Chapter

void Tcl_FindExecutable(argv[0])

Computes the path of the executable, which is needed for several mechanisms internal to Tcl.

CONST char *Tcl_GetNameOfExecutable()

Returns a path to the full path name of the application.

int Tcl_Init(Tcl_Interp *interp)

Carries out various Tcl initialization tasks, such as sourcing Tcl’s own init.tcl.

int Tcl_AppInit(Tcl_Interp *interp)

User-supplied hook procedure used in the creation of new tclsh-style programs.

37.2 Adding Tcl to an Application ...

Get Tcl and the Tk Toolkit, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.