I'm making an app in C and I've built it using the following command:
gcc `pkg-config --cflags gtk+-3.0` main.c -o hello `pkg-config --libs gtk+-3.0` -lX11 -rdynamic
And this works, cool! Except.. when I try to copy the exported file into another folder such as /usr/bin, then it throws the following errors:
(hello:11178): GLib-GObject-WARNING **: 16:35:55.999: invalid (NULL) pointer instance
(hello:11178): GLib-GObject-CRITICAL **: 16:35:55.999: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(hello:11178): Gtk-CRITICAL **: 16:35:55.999: gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed
Here's my code. Ignore the meson file. https://github.com/JohnyTheCarrot/Paperplane
pkg-config:
-pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include```