Posted to tcl by dgp at Fri Dec 12 17:54:50 GMT 2008view pretty
#undef USE_TCL_STUBS #include "tcl.h" #define USE_TK_STUBS #include "tk.h" int appInitProc(Tcl_Interp *interp) { return TCL_OK; } int main(int argc, char **argv) { Tcl_Interp *interp = Tcl_CreateInterp(); if (Tcl_Init(interp) == TCL_ERROR) { Tcl_Panic("borked Tcl install!"); } #undef Tcl_InitStubs if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { Tcl_Panic("Cannot init Tcl stubs!"); } if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) { Tcl_Panic("Cannot find Tk!"); } Tk_MainEx(argc, argv, appInitProc, interp); }