Hi!
I have made a const char as follows:
char const Ccode [] =
"#include <stdio.h>\n"
"#include <stdlib.h>\n"
"#include <math.h>\n"
"include <tcl.h>\n"
"#include <tk.h>\n"
"\n"
"#define TCLGO TCL_GLOBAL_ONLY\n"
"main(int argc, char *argv[])\n"
"{\n"
" Tcl_Interp *interp;\n"
" Tk_Window mainWindow;\n"
" Tk_Window tkmain;\n"
" int error;\n"
" char *trace;\n"
" \n"
"/* first we create a Tcl interpreter */\n"
"\n"
" interp = Tcl_CreateInterp();\n"
"\n"
"/* now we create a Tk main window */\n"
"\n"
" tkmain = Tk_MainWindow(interp);\n"
"\n"
"/* now we initialize our interpreter for Tcl,Tk,and our personal\n"
" example C commands */\n"
"\n"
" if(Tcl_Init(interp) != TCL_OK) {\n"
" fprintf(stderr, "Tcl_Init failed: %s\n", interp->result);"\n"
" }\n"
" if(Tk_Init(interp) != TCL_OK) {
" fprintf(stderr, "Tk_Init failed: %s\n", interp->result);
" }\n"
....
And I get errors when compiling it seems at lines like
" fprintf(stderr, "Tcl_Init failed: %s\n", interp->result);"\n"
What should I do then?
Thanks!
I have made a const char as follows:
char const Ccode [] =
"#include <stdio.h>\n"
"#include <stdlib.h>\n"
"#include <math.h>\n"
"include <tcl.h>\n"
"#include <tk.h>\n"
"\n"
"#define TCLGO TCL_GLOBAL_ONLY\n"
"main(int argc, char *argv[])\n"
"{\n"
" Tcl_Interp *interp;\n"
" Tk_Window mainWindow;\n"
" Tk_Window tkmain;\n"
" int error;\n"
" char *trace;\n"
" \n"
"/* first we create a Tcl interpreter */\n"
"\n"
" interp = Tcl_CreateInterp();\n"
"\n"
"/* now we create a Tk main window */\n"
"\n"
" tkmain = Tk_MainWindow(interp);\n"
"\n"
"/* now we initialize our interpreter for Tcl,Tk,and our personal\n"
" example C commands */\n"
"\n"
" if(Tcl_Init(interp) != TCL_OK) {\n"
" fprintf(stderr, "Tcl_Init failed: %s\n", interp->result);"\n"
" }\n"
" if(Tk_Init(interp) != TCL_OK) {
" fprintf(stderr, "Tk_Init failed: %s\n", interp->result);
" }\n"
....
And I get errors when compiling it seems at lines like
" fprintf(stderr, "Tcl_Init failed: %s\n", interp->result);"\n"
What should I do then?
Thanks!