Pkg-config glib-2.0 error on Mac OS X

I have C code that will not compile.

Error message when running "make":

gcc -Wall -Wno-pointer-sign -g `pkg-config --cflags glib-2.0 gconf-2.0` \ -c main.c Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found 

Performing a quick search on a Mac using location I don’t see any glib-2.0 files, so I wonder if I need to install it. And if so, what is the best way to do this?

+6
source share
3 answers

A simple solution: install Homebrew, type brew install glib , and you should be good to go.

+19
source

I will use a system like Fink . Packages are fixed as needed, and dependencies are tracked automatically. This is much simpler than DIY.

+2
source

Using the --with-internal-glib flag in the ./configure command worked for me.

+1
source

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


All Articles