From: Alexander C. <Ale...@gm...> - 2004-04-13 09:55:03
|
Hi! I am sorry that I have disturb you, but since I have no experience with Tcl/Tk I need a good tip from an expert. I am currently trying to port Berkerlys NetworkSimulator (ns) to AquaTcl/tk. So far, so good, the simulator passes all tests. But I have problems to get the visual analyser nam to work. After playing around with the XCode debugger, it seems that I found the problem. It does not find the Tk extension. This is the code: first: #if TCL_MAJOR_VERSION < 8 Tcl_SetVar(interp, "tcl_library", "./lib/tcl7.6", TCL_GLOBAL_ONLY); Tcl_SetVar(interp, "tk_library", "./lib/tk4.2", TCL_GLOBAL_ONLY); #else Tcl_SetVar(interp, "tcl_library", "", TCL_GLOBAL_ONLY); Tcl_SetVar(interp, "tk_library", "", TCL_GLOBAL_ONLY); // this seems just a hack, should NOT have hard-coded library path! // why there's no problem with old TCL/TK? // xuanc, 10/3/2003 //Tcl_SetVar(interp, "tcl_library", "./lib/tcl8.0", TCL_GLOBAL_ONLY); //Tcl_SetVar(interp, "tk_library", "./lib/tk8.0", TCL_GLOBAL_ONLY); #endif and later (where it exits): if (Tk_Init(tcl.interp()) == TCL_OK) tk = Tk_MainWindow(tcl.interp()); if (tk == 0) { fprintf(stderr, "nam: %s\n", interp->result); exit(1); the error message: nam: invalid command name "tcl_findLibrary" Do you have any ideas whats going on? Where does AquaTcl search for extensions? regards, Alexander Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |