The demo works fine but if I change the 3 in the second line to 4 I get the following error in response to ‘meson compile’.
../meson.build:2:0: ERROR: Dependency "gtk+-4.0" not found, tried pkgconfig and cmake
I’m totally lost here.
It’s so long since I installed gtk4 I can’t remember how I did it but I think it was using pamac or pacman. I don’t recall installing gtk3 (getting gtk4 was the reason I moved from ubuntu) so I’m puzzled why gtk3 is there unless it’s a dependency of 4.
I’ve also no idea why there’s a plus sign after the ‘gtk’.
Thanks Yochanan. This time it found the library although it’s no longer working due to not finding some functions in the main.c file. The errors are
[1/2] Compiling C object demo.p/main.c.o
../main.c: In function ‘activate’:
../main.c:13:3: warning: implicit declaration of function ‘gtk_container_add’ [-Wimplicit-function-declaration]
13 | gtk_container_add (GTK_CONTAINER (window), label);
| ^~~~~~~~~~~~~~~~~
../main.c:13:22: warning: implicit declaration of function ‘GTK_CONTAINER’; did you mean ‘GTK_CONSTRAINT’? [-Wimplicit-function-declaration]
13 | gtk_container_add (GTK_CONTAINER (window), label);
| ^~~~~~~~~~~~~
| GTK_CONSTRAINT
../main.c:16:3: warning: implicit declaration of function ‘gtk_widget_show_all’; did you mean ‘gtk_widget_show’? [-Wimplicit-function-declaration]
16 | gtk_widget_show_all(window);
| ^~~~~~~~~~~~~~~~~~~
| gtk_widget_show
[2
but I’m assuming this is down to differences between 3 & 4.