Я делаю приложение на C, и я создал его с помощью следующей команды:
gcc `pkg-config --cflags gtk+-3.0` main.c -o hello `pkg-config --libs gtk+-3.0` -lX11 -rdynamic
И это работает, круто! За исключением... когда я пытаюсь скопировать экспортированный файл в другую папку, например /usr/bin, возникают следующие ошибки:
(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
Вот мой код. Игнорируйте файл мезона. https://github.com/JohnyTheCarrot/Paperplane
пакет-конфигурация:
-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```
pkg-config --cflags gtk+-3.0
? - person John   schedule 02.10.2019option_open
иmain
с помощью printfs и посмотрел, что установлено дляhomedir
. - person John   schedule 02.10.2019fflush(stdout)
на месте. - person John   schedule 02.10.2019fflush(stdout)
просто проверяет, чтоprintf
печатаются, прежде чем продолжить. - person John   schedule 02.10.2019