delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/01/18/11:19:11

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F16F0E1.1000903@mff.cuni.cz>
Date: Wed, 18 Jan 2012 17:18:41 +0100
From: Pavel Kudrna <Pavel DOT Kudrna AT mff DOT cuni DOT cz>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Segmentation fault in Tcl_Init()
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019