diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | gauss_cv.c | 9 |
2 files changed, 10 insertions, 3 deletions
@@ -19,8 +19,8 @@ capture_LIBS=$(shell pkg-config --libs gtk+-3.0 opencv glib-2.0) unvignette_CFLAGS=$(shell pkg-config --cflags cairo) unvignette_LIBS=$(shell pkg-config --libs cairo) -lm -gauss_cv_CFLAGS=$(shell pkg-config --cflags gtk+-3.0 gmodule-2.0 opencv) -gauss_cv_LIBS=$(shell pkg-config --libs gtk+-3.0 gmodule-2.0 opencv) +gauss_cv_CFLAGS=$(shell pkg-config --cflags gtk+-3.0 glib-2.0 gmodule-2.0 opencv) +gauss_cv_LIBS=$(shell pkg-config --libs gtk+-3.0 glib-2.0 gmodule-2.0 opencv) PROGS = wimmel wimmel_gl roi capture unvignette gauss_cv OBJS = $(PROGS:=.o) util.o @@ -1,5 +1,6 @@ #include <string.h> #include <gtk/gtk.h> +#include <glib.h> #include <cv.h> #include <highgui.h> @@ -208,14 +209,20 @@ main(int argc, char *argv[]) struct cvg cvg; GtkBuilder *builder; GObject *file_chooser; + gchar *path, *file; memset(&cvg, 0, sizeof cvg); gtk_init(&argc, &argv); if (argc >= 2) open_file(&cvg, argv[argc-1]); + builder = gtk_builder_new(); - gtk_builder_add_from_file(builder, "gauss_cv.ui", NULL); + path = g_path_get_dirname(argv[0]); + file = g_build_filename(path, "gauss_cv.ui", NULL); + gtk_builder_add_from_file(builder, file, NULL); + g_free(path); + g_free(file); gtk_builder_connect_signals(builder, &cvg); cvg.drawing_area1 = GTK_WIDGET(gtk_builder_get_object(builder, |