This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Segmentation fault in Tcl_Init()


Hi All,
I have problem with tcl initialization, see example. Am I doing something wrong?
Thanks for help
Pavel Kudrna


$ cat example.c
#include <stdio.h>
#include <tcl.h>

int main(int argc, char * argv[])
{
 printf("Tcl_CreateInterp()\n");

Tcl_Interp * interp = Tcl_CreateInterp();

 if (!interp) { printf("failed.\n");
                return 0;
              }
 else printf("OK.\n");

printf("Tcl_Init()\n");

 if (Tcl_Init(0) == TCL_ERROR) printf("failed\n");
 else printf("OK\n");

 return 0;
}

$ gcc example.c -l tcl -o example
$ ./example
Tcl_CreateInterp()
OK.
Tcl_Init()
Segmentation fault (core dumped)
$

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]