开发者

how to get automate to use /usr/include/glib-2.0 instead of /usr/local/include/glib-2.0

I am not sure when this change occurred on my system, but I used to be able to build something that used /usr/include/glib-2.0. But now my build is failing due to glib, and I notice that it is using another version of /usr/local/include/glib-2.0.

How can I get it to use /usr/lib instead of 开发者_开发知识库/usr/local/lib for glib? I tried removing /usr/local/include/glib-2.0 and /usr/local/lib/glib-2.0, but it still tries to use those paths and fails.


well, a solution I found was to download the glib source, build it and install it to /usr/local, and then run "sudo make uninstall" ... kind of a hack, but it worked


The best way of getting the proper path to glib in your buildscripts is to use the pkg-config tool to get the flags for gcc. E.g gcc $(pkg-config --cflags glib-2.0) foo.c


If you have eveer compiled and installed glib by yourself and did not change the prefix, you might have glib-2.0.pc in pkg-config's default search path. You can check which .pc file is used with --debug option.

Or, you can check the contents of glib-2.0.pc to see it has the right prefix or not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜