Created
November 10, 2019 07:18
-
-
Save fearofcode/07aac17a1ee2b4f523e2c48c75b3aed5 to your computer and use it in GitHub Desktop.
very first gtk program that checks that the library is installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtk/gtk.h> | |
/* to compile in ubuntu: | |
* | |
* sudo apt install libgtk2.0-dev | |
* | |
* in bash: gcc `pkg-config --cflags --libs gtk+-2.0` learning_gtk.c -o learning_gtk | |
* in fish shell: gcc learning_gtk.c (pkg_config --cflags --libs gtk+-2.0 | perl -pe | |
* 's/\s+/\n/g) -o learning_gtk | |
*/ | |
int main(int argc, char *argv[]) { | |
gtk_init(&argc, &argv); | |
GtkWidget *win = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
gtk_widget_show(win); | |
gtk_main(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment