Reputation: 674
I have just a simple program
#include <gtk/gtk.h>
int main() {
GtkWidget * drawingarea = gtk_drawing_area_new(); // <-- Segfault
return 0;
}
which just creates a drawing area. But it segfaults. Why? I'm using ubuntu 18.04.
Upvotes: 0
Views: 56
Reputation: 674
Using gtk_init
before the call to gtk_drawing_area_new
solves this problem.
Upvotes: 1