[Add comments regarding examples of building tcl and tcl based programs in this development environment.]
http://groups.google.com/group/comp.lang.tcl/msg/470881fc423d4d4d is a message posted to comp.lang.tcl by Michael Reichenbach, where he describes the steps he took to build some C++ code that accesses the Tcl library.
The highlights are:
#define USE_TCL_STUBS 1 #include <tcl.h> #include <stdio.h> extern "C" { __declspec(dllexport) int Foo_Init(Tcl_Interp* interp); } static int fooCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj * CONST objv) { printf("called with %d arguments\n", objc); return TCL_OK; } int Foo_Init(Tcl_Interp *interp) { if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } printf("creating foo command"); Tcl_CreateObjCommand(interp, "foo", fooCmd, NULL, NULL); return TCL_OK; }
If you can provide more examples of building using this environment, please add the information to this page.