Also, I'm attempting to link a C++ string to a TCL variable, and can't seem to do it. With the following code, I get strange behavior, such as the string being set to the *name* of the TCL variable. I assume I'm being an idiot and confusing the pointers or something, but I can't get it to work, and I'm starting to wonder if there might be a bug with LinkVar..
Now feel free to tell me why I'm an idiot. =)
...
char *statusString;
statusString = Tcl_Alloc(6);
Tcl_LinkVar(interp, "status", statusString, TCL_LINK_STRING);
statusString = "WHY??";
...
Now feel free to tell me why I'm an idiot. =)
...
char *statusString;
statusString = Tcl_Alloc(6);
Tcl_LinkVar(interp, "status", statusString, TCL_LINK_STRING);
statusString = "WHY??";
...