Re: [gtk-osx-users] GTK3 examples displayed on Catalina.
- From: John Ralls <jralls ceridwen us>
- To: Pascal <p p14 orange fr>
- Cc: gtk-osx-users-list gnome org
- Subject: Re: [gtk-osx-users] GTK3 examples displayed on Catalina.
- Date: Sun, 26 Jan 2020 09:43:55 -0800
On Jan 26, 2020, at 1:01 AM, Pascal <p p14 orange fr> wrote:
Le 25 janv. 2020 à 19:46, John Ralls <jralls ceridwen us> a écrit :
On Jan 25, 2020, at 2:08 AM, Pascal <p p14 orange fr> wrote:
Hello,
I've installed gtK3 on Catalina with jhbuild from GTK-OSX (see my previous post).
In order to get a quick test, I took the example "opening files" from:
https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.7
This example is on GitLab:
https://gitlab.gnome.org/GNOME/gtk/tree/gtk-3-22/examples/application3
I built it:
% jhbuild shell
% cd ... # application3 folder
% make -f Makefile.example
...
And ran it:
% ./exampleapp
But the displayed window is empty instead of looking like the one displayed in the tutorial.
Is it the same on your installed gtk3?
The gtk3-demo in $prefix/bin seems to work properly.
What is wrong?
You have to pass one or more files for it to open on the command line, e.g.
$PREFIX/../src/gtk+-3.24.10/examples/application3/exampleapp ~/foo.txt ~/bar.txt
Where did Makefile.example come from and why did you find it necessary to build it by hand? It should have
been built along with everything else.
Hello John,
The makefile comes from GitLab sources.
I built it from GitLab sources as it didn't work from GTK3 sources.
I missed that the files were coming from command line, thanks John :-)
Well, now I put them on the command line with no more success:
% ./exampleapp exampleapp.h main.c
<Capture d’écran 2020-01-26 à 09.51.43.png>
A rapid look in the debugger shows that they are taken in account:
Breakpoint 1, example_app_open (app=0x1028010f0, files=0x1020c61f0, n_files=2,
hint=0x102047160 "") at exampleapp.c:43
43 for (i = 0; i < n_files; i++)
(gdb) p n_files
$1 = 2
What else?
Pascal, gitlab.gnome.org/GNOME/gtk is the canonical repo for Gtk so there's no difference between "the gitlab
sources" and "the GTK3 sources" except that the branch you used isn't the current one.
I don't know "what else" because it works for me using the exampleapp in the build tree. Might be that you
messed up the manual build. Might be that you need to give it absolute paths. Looks like it's an opportunity
for you to sharpen your C debugging skills.
Regards,
John Ralls
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]