zou...@zte.com.cn
unread,Feb 20, 2012, 8:24:38 AM2/20/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I am learning Tcl.
as an exercise,I want to write C code for Tcl application.
The code is copied from the help document as below:
--------------------------------------------------------------------------
#include <tcl.h>
#include <stdio.h>
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;
}
-----------------------------------------------------------------------------
I compile it by VS 2005 C++ and create the dll success.
but when I load the dll in tkcon ,it is alwayes report error as
below :
-------------------------------------------------------
load d:/tcl/test/mydll/Foo_Init.dll
can't find the procedure Foo_Init
------------------------------------------------------
could you tell me what wrong with my operating . If the dll has some
fault?
thanks a lot .