tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] segmentation fault when linking with newt


From: Andrés Ramírez
Subject: [Tinycc-devel] segmentation fault when linking with newt
Date: Mon, 06 Jul 2015 10:20:46 -0500

Hi guys.

I am trying this simple example (which fails on the line with 
newtFormAddComponents):

#include <newt.h>
#include <stdio.h>
#include <stdlib.h>
/* tcc -g -o button.bin button.c -lnewt */
/* gdb --annotate=3 -i=mi --args  button.bin  */
void main(void) {
  int left, top, width, height;
  
  newtComponent form, b1, b2, b3, b4, bback;
  newtInit();
  newtCls();

  left = 10;
  top = 5;
  width = 40;
  height = 10;
  newtOpenWindow(left, top, width, height, "Shell Buttons");

  b1 = newtCompactButton(left, 1, "Uno");
  b2 = newtCompactButton(left, 2, "Dos");
  b3 = newtCompactButton(left, 3, "Tres");
  b4 = newtCompactButton(left, 4, "Cuatro");
  bback = newtButton(left, 6, "Back");
  form = newtForm(NULL, NULL, 0);
  /* newtFormAddComponents fails with tcc */
  newtFormAddComponents(form, b1, b2, b3, b4, bback);

  newtRunForm(form);

  newtFormDestroy(form);
  newtFinished();
}


Let me know. If You need any other info. Best Regards 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]