Hi all,
Thanks for your replies.
I'm researching you comments, but here's some answers to your
questions.
The example_builder.cc file cam from the source download:
gtkmm-3.18.1/demo/gtk-demo/example_builder.cc
The COMP_RES line is a mix/alteration of the Programming with gtkmm3
chanpter 12 section on gio::resources and the makefile in the source
download gtkmm-3.18.1/demos directory.
You were right... The problem is in the $(COMP_RES) line:
It turns out that there was a compiler error, although the result said
' compilation finished'.
I've been playing with that line, trying to adjust it to what the
source download 'demos/Makefile' used: e.g.
gtk-demo/demo_resources.c: gtk-demo/demo.gresource.xml
$(GTK_DEMO_RESOURCES) $(GTK_DEMOS)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --
sourcedir=$(dir $<) --generate-source $<
So, here's my current makefile:
PKGS = gtkmm-3.0 #epoxy
INCL = `pkg-config --cflags $(PKGS)`
LIBS = `pkg-config --libs $(PKGS)`
COMP_RES = /usr/lib/x86_64-linux-gnu/glib-2.0/glib-compile-resources
CC = g++
CFLAGS = -g -Wall $(INCL)
EXE = x
OBJS = example_builder.o resource.c
DIR = `pwd`
resource.c: gresource.xml example_builder.ui
$(COM P_RES) --target=$@ --sourcedir=$(DIR) --generate-
source $<
#$@ --sourcedir=$(dir $<) --generate-source $<
all: $(EXE)
$(EXE): $(OBJS)
$(CC) $(OBJS) $(LIBS) -o $(EXE)
example_builder.o: example_builder.cc
$(CC) $(CFLAGS) -c example_builder.cc
clean:
rm *.o *.
and here's the make output:
-*- mode: compilation; default-directory: "~/gtkmm3/builder/" -*-
Compilation started at Sun Apr 9 14:01:54
make -k
target=resource.c --sourcedir=`pwd` --generate-source gresource.xml
/bin/sh: 1: --sourcedir=/home/marty/gtkmm3/builder: not found
makefile:14: recipe for target 'resource.c' failed
make: [resource.c] Error 127 (ignored)
Compilation finished at Sun Apr 9 14:01:5
But the 'missing' directory, /home/marty/gtkmm3/builder is my current
working directory.
So, I've been trying to piece together what I can find that talks about
using gio::resources. Unfortunately, the chapter 12 section talks about
using gio::resources, but the examples in chapter 12 don't use
gio::resource to load these files.
I nees to learn this since the example_glarea.cc example uses
gio::resource to load the glsl dhadres, which is where I'm headed if I
can figure this out.
My gresouce.xml file has a '>' at the end, so I must have a typo in my
email.
That's the latest. I hope this helps.
Thanks again, I really appreciate your help!
Marty
On Sun, 2017-04-09 at 10:13 +0200, Kjell Ahlstedt wrote:
> Den 2017-04-08 kl. 18:14, skrev Marty Moore:
> > resource.c: gresource.xml example_builder.ui
> > $(COM P_RES) --target=resource.c --generate-source
> > builder.gresource.xml
> >
> $(COM P_RES) looks wrong. Should be $(COMP_RES), I suppose. Strange
> that it builds. Does resource.c become an empty file? Or is this a
> bug only in your e-mail, but not in the makefile that you actually
> use?
> Kjell
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list