Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtklos.c:28:10: fatal error: gtk/gtk.h: No such file or directory #620

Open
dufresnep opened this issue Jan 31, 2024 · 2 comments
Open

gtklos.c:28:10: fatal error: gtk/gtk.h: No such file or directory #620

dufresnep opened this issue Jan 31, 2024 · 2 comments

Comments

@dufresnep
Copy link

After applying the trick: export STKLOS_GTK_DIR=/usr/lib/x86_64-linux-gnu
I got:

paul@bismark:~/Téléchargements/stklos-2.00/extensions/gtklos$ LANG=C make
Making all in lib/stklos
make[1]: Entering directory '/home/paul/Téléchargements/stklos-2.00/extensions/gtklos/lib/stklos'
gcc -g -O2   -fpic -nostdlib \
          \
         -I../../../../src -I../../../../gc/include  \
         -c -o gtklos.o gtklos.c
gtklos.c:28:10: fatal error: gtk/gtk.h: No such file or directory
   28 | #include <gtk/gtk.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:594: gtklos.so] Error 1
make[1]: Leaving directory '/home/paul/Téléchargements/stklos-2.00/extensions/gtklos/lib/stklos'
make: *** [Makefile:391: all-recursive] Error 1
paul@bismark:~/Téléchargements/stklos-2.00/extensions/gtklos$ ls

I have tried to edit it a bit, to fix the path:
#include <gtk-3.0/gtk/gtk.h>

paul@bismark:~/Téléchargements/stklos-2.00/extensions/gtklos$ LANG=C make
Making all in lib/stklos
make[1]: Entering directory '/home/paul/Téléchargements/stklos-2.00/extensions/gtklos/lib/stklos'
gcc -g -O2   -fpic -nostdlib \
          \
         -I../../../../src -I../../../../gc/include  \
         -c -o gtklos.o gtklos.c
In file included from gtklos.c:28:
/usr/include/gtk-3.0/gtk/gtk.h:30:10: fatal error: gdk/gdk.h: No such file or directory
   30 | #include <gdk/gdk.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:594: gtklos.so] Error 1
make[1]: Leaving directory '/home/paul/Téléchargements/stklos-2.00/extensions/gtklos/lib/stklos'
make: *** [Makefile:391: all-recursive] Error 1
paul@bismark:~/Téléchargements/stklos-2.00/extensions/gtklos$ 

paul@bismark:~/Téléchargements/stklos-2.00/extensions/gtklos$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy


@dufresnep
Copy link
Author

But I don't know yet where I could add the -I/usr/include/gtk-3.0

paul@bismark:~/Téléchargements/stklos-2.00/extensions/gtklos$ pkg-config --cflags gtk+-3.0
-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/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
paul@bismark:~/Téléchargements/stklos-2.00/extensions/gtklos$ ls

found that on: https://www.linuxquestions.org/questions/programming-9/gtk-gtk-h-not-found-when-trying-to-compile-c-gtk-program-4175698277/

@egallesio
Copy link
Owner

Hi Paul,

If you have installed the devel package after having configured STklos, you'll have to run configure again. Normally, you should see the output of pkg-config in the file extensions/gtklos/lib/stklos/Makefile (to initialize the variable GTKFLAGS near line 345).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants