I have a problem with initialising TclX from a C program.
I'm using version 8.4 of Tcl and TclX.
My '~/.tclshrc' file contains 'package require Tclx', and all TclX
commands are available in 'tclsh'. No problem there.
My C program contains basically
interp = Tcl_CreateInterp();
Tclx_Init(interp);
Up to now I have used TclX commands successfully in the embedded
interpreter in the C program. However, now I tried to use TclX command
'union' for the first time in the embedded interpreter, and the
command is not available (alhtough it is available in 'tclsh').
I'm no expert in this area but I noticed that 'union' is defined as an
ordinary Tcl procedure in
/usr/lib/tclx8.4/setfuncs.tcl
whereas the commands that are available in the embedded interpreter,
such as 'lassign', are probably implemented as C functions.
I checked that I can load 'uinion' in the embedded interpreter by
executing
source /usr/lib/tclx8.4/tclx.tcl
in the interpreter. However, to actually use this as a solution, I
would need a way to retrieve the TclX library path (in my installation
'/usr/lib/tclx8.4') in the C program.
Any suggestions?
Hannu Peltonen