GTK + installed with brew not found when I try to compile other applications

I installed GTK with brew install gtk+ since I need to compile it xchat from the source code on my Mac. When I try to install it hard, it says Cannot find GTK! Not building GTK FrontEnd. Cannot find GTK! Not building GTK FrontEnd. I suspect that I had to update the environment variables after installing gtk +, but I do not know how to do this.

 iMac:xchat-2.8.8 Domenico$ brew info gtk+ gtk+: stable 2.24.20 http://gtk.org/ /usr/local/Cellar/gtk+/2.24.20 (1184 files, 52M) * // here is the path!!! Built from source From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/gtk+.rb ==> Dependencies Build: pkg-config, xz Required: glib, jpeg, libtiff, gdk-pixbuf, pango, atk, cairo Optional: jasper ==> Options --with-jasper Build with jasper support 

The path is indicated in the code above. I tried adding all things related to it (e.g. /usr/local/Cellar/gtk+/2.24.20/bin or /usr/local/Cellar ) to $LD_LIBRARY_PATH , but this did not work. Any ideas?

+4
source share
1 answer

I had familiar problems after brew install gtk+ . In particular, I received:

  Package xcb-shm was not found in the pkg-config search path. Perhaps you should add the directory containing `xcb-shm.pc' to the PKG_CONFIG_PATH environment variable Package 'xcb-shm', required by 'cairo', not found app.c:1:10: fatal error: 'gtk/gtk.h' file not found #include <gtk/gtk.h> ^ 1 error generated. make: *** [app] Error 1 

while make running for my application, and this command solved my problem:

export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig

A detailed answer to this problem has already been given here: fooobar.com/questions/1493965 / ....


This can be a problem, since gtk+ depends on these libraries ( source ):

 Glib Pango ATK GDK GdkPixbuf Cairo 
+2
source

Source: https://habr.com/ru/post/1493963/


All Articles