that is how I build it: gcc pkg-config --cflags --libs gtk+-2.0
-o spawn spawn_with_pipes.c
In the snippet of example below, I get an error: syntax error before "Data - it refers to data= g_slice_new(Data);
#include <gtk/gtk.h>
typedef struct
{
/* Buffers that will display output */
GtkTextBuffer *out;
GtkTextBuffer *err;
/* Progress bar that will be updated */
GtkProgressBar *progress;
/* Timeout source id */
gint timeout_id;
}Data;
data= g_slice_new(Data); //error here