Re: Embedding Tk in an MFC application



Right, after some Googling and lots of fiddling around I've __almost__
got it working:

Here's what I do.

- Tcl_FindExecutable()
- Tcl_CreateInterp()
- use Tcl_SetVar() to set the "tcl_library" variable to tell the
interpreter where to look for the library scripts
- Tcl_Init() ... works
- Tk_Init() ... ERROR!! "invalid command name Tcl_findLibrary"

I've read posts by other people who've also encountered this problem in
their case it was usually a matter of forgetting to call Tcl_Init()
before Tk_Init() or the init.tcl script being from another version than
the embedded interpreter, but in my case I've made sure that the
versions are the same. What else could be causing this error?

.


Quantcast