Displaying 1 result from an estimated 1 matches for "tcl_setobjresult".
Did you mean:
tcl_getobjresult
2011 Feb 08
1
Compiling a Tcl extension for an R package
...der
Linux, Windows and OSX? (i.e. writing a configure script with the
correct compile commands).
Thanks,
Adrian Waddell
###########################
C Code (save as hello.c):
#include <tcl.h>
static int Hello_Cmd(ClientData cdata, Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("Hello, World!", -1));
return TCL_OK;
}
int DLLEXPORT Hello_Init(Tcl_Interp *interp) {
Tcl_CreateObjCommand(interp, "hello", Hello_Cmd, NULL, NULL);
return TCL_OK;
}
which can be compiled (under Ubuntu 10.04) with:
gcc -shared -o hello.so -DUSE_TC...