Segmentation fault in Tcl_Init()

Pavel Kudrna Pavel.Kudrna@mff.cuni.cz
Wed Jan 18 16:19:00 GMT 2012


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



More information about the Cygwin mailing list