Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pkg-config glib-2.0 error on Mac OS X

Tags:

macos

glibc

I've got some C code which won't compile.

The error message when I run "make" is:

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

Doing a quick search on the Mac using locate I can't see any glib-2.0 files so I'm wondering if I have to install it. And, if so, what's the best way of doing so?

like image 928
Snowcrash Avatar asked Sep 29 '11 09:09

Snowcrash


2 Answers

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

like image 70
johnzachary Avatar answered Oct 20 '22 01:10

johnzachary


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

like image 34
Eric Avatar answered Oct 20 '22 00:10

Eric