I want to use a custom TCL interpreter as the prefix file of TclDevKit's tclapp
.
I have a TCL interpreter built from the following file:
// file main.cpp
#include <tcl.h>
int
Tcl_AppInit( Tcl_Interp* interp )
{
if ( Tcl_Init( interp ) == TCL_ERROR ) {
return TCL_ERROR;
}
if ( Tcl_Eval( interp, "puts \"this is my interpreter\"" ) == TCL_ERROR ) {
return TCL_ERROR;
}
return TCL_OK;
}
int
main( int argc, char** argv )
{
Tcl_Main( argc, argv, &Tcl_AppInit );
return 0;
}
I build main.cpp
with the following command:
g++ -Wl,-R/usr/local/lib -L/usr/local/lib -ltcl main.cpp -o myinterp
and get an interpreter myinterp
.
How should I modify main.cpp
and the g++
command above to be able to pass myinterp
as -prefix
option of TclDevKit's tclapp
?