#errors trying to compile gtk sample code

2 messages · Page 1 of 1 (latest)

ember fox
#

I'm getting a whole bunch of errors attempting to run this sample script from the gtk website, I believe they have to do with the command that was used to compile the script, but I'm not sure. Any ideas I can test out?

compile command:
C:\msys64\mingw64\bin\gcc.exe" -o "c:\Users[USERNAME]\Documents\ccpp\c app\build\debug\app.exe" "c:\Users[USERNAME]\Documents\ccpp\c app\app.c" -I "C:\msys64\mingw64\include\gtk-3.0" -I "C:\msys64\mingw64\include\glib-2.0" -I "C:\msys64\mingw64\lib\glib-2.0\include" -I "C:\msys64\mingw64\include\cairo" -I "C:\msys64\mingw64\include\pango-1.0" -I "C:\msys64\mingw64\include\harfbuzz" -I "C:\msys64\mingw64\include\gdk-pixbuf-2.0" -I "C:\msys64\mingw64\include\graphene-1.0" -I "C:\msys64\mingw64\lib\graphene-1.0\include" -I "C:\msys64\mingw64\include\atk-1.0"

#include <gtk/gtk.h>
#include <stdbool.h>

static void
activate(GtkApplication *app, gpointer user_data){
  GtkWidget *window = gtk_application_window_new(app);
  gtk_window_set_title(GTK_WINDOW(window), "Window");
  gtk_window_set_default_size(GTK_WINDOW(window), 200, 200);
  gtk_widget_set_visible(window, true);
}

int main(int argc, char **argv){
  GtkApplication *app;
  int status;

  app = gtk_application_new("org.gtk.example", G_APPLICATION_DEFAULT_FLAGS);
  g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
  status = g_application_run(G_APPLICATION(app), argc, argv);
  g_object_unref(app);

  return status;
}
pastel meadowBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.