Displaying 5 results from an estimated 5 matches for "tcl_ok".
Did you mean:
gcc_ok
2011 Feb 08
1
Compiling a Tcl extension for an R package
...e 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_TCL_STUBS -I/usr/include/tcl8.5/ hello.c
-L/usr/lib/ -ltclstub8.5 -fPIC
and...
2018 Jul 01
2
[PATCH nbdkit] Add Tcl plugin, for writing plugins in Tcl.
...rrno.h>
+#include <assert.h>
+
+#include <tcl.h>
+
+#include <nbdkit-plugin.h>
+
+static Tcl_Interp *interp;
+static const char *script;
+
+static void
+tcl_load (void)
+{
+ //Tcl_FindExecutable ("nbdkit");
+ interp = Tcl_CreateInterp ();
+ if (Tcl_Init (interp) != TCL_OK) {
+ nbdkit_error ("cannot initialize Tcl interpreter: %s",
+ Tcl_GetStringResult (interp));
+ exit (EXIT_FAILURE);
+ }
+}
+
+static void
+tcl_unload (void)
+{
+ if (interp)
+ Tcl_DeleteInterp (interp);
+ Tcl_Finalize ();
+}
+
+/* Test if proc was defined by t...
2011 Aug 14
2
Problem installing R Commander plugin...
...ifier-list before
?Tk_Window?
tcltkimg.c: In function ?GetRplotImage?:
tcltkimg.c:164: error: ?TCL_ERROR? undeclared (first use in this
function)
tcltkimg.c:164: error: (Each undeclared identifier is reported only once
tcltkimg.c:164: error: for each function it appears in.)
tcltkimg.c:168: error: ?TCL_OK? undeclared (first use in this function)
tcltkimg.c: In function ?CreateRplot?:
tcltkimg.c:193: error: expected declaration specifiers before
?Tcl_Interp?
tcltkimg.c:196: error: expected declaration specifiers before ?Tcl_Obj?
tcltkimg.c:198: error: expected declaration specifiers before
?Tk_ImageT...
2008 May 04
1
Change in the Tcl/Tk loading in R 2.7.0 (under Unix/Mac OS X)?
Hello,
Up to R 2.6.2, I used to start Tcl *without Tk* (I need only Tcl for
some part of my work, like a socket server written in Tcl only, for
instance) with this code under Mac OS X (particularly on this system,
because I don't want to start X11 just to use Tcl code, which is
required for Tk!):
> Sys.unsetenv("DISPLAY")
> library(tcltk)
I got then the message
2012 May 14
0
phyloclim could not be installed in linux - problems on tkrplot dependence
...ifier-list before ‘Tk_Window’
tcltkimg.c: In function ‘GetRplotImage’:
tcltkimg.c:164: error: ‘TCL_ERROR’ undeclared (first use in this function)
tcltkimg.c:164: error: (Each undeclared identifier is reported only once
tcltkimg.c:164: error: for each function it appears in.)
tcltkimg.c:168: error: ‘TCL_OK’ undeclared (first use in this function)
tcltkimg.c: In function ‘CreateRplot’:
tcltkimg.c:193: error: expected declaration specifiers before ‘Tcl_Interp’
tcltkimg.c:196: error: expected declaration specifiers before ‘Tcl_Obj’
tcltkimg.c:198: error: expected declaration specifiers before ‘Tk_ImageT...