install: No package 'glib-2.0' found

2,300 views
Skip to first unread message

Jackie Li

unread,
Oct 21, 2013, 11:31:00 AM10/21/13
to go-...@googlegroups.com
Hi everybody,

I followed the installing instructions on github page, besides that I've also added PKG_CONFIG_PATH C:\Qt\Qt5.1.1\5.1.1\mingw48_32\lib\pkgconfig;C:\MinGW\lib\pkg-config

But I get this error:

C:\Users\me>go get -u -v github.com/niemeyer/qml
github.com\niemeyer\qml (download)
# pkg-config --cflags Qt5Core Qt5Widgets Qt5Quick glib-2.0
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
exit status 1



I looked it up a little bit, and found out this glib is GNOME library. Why is this depending on a GNOME library? and how can solve this?


Thanks very much,
Jackie

Gustavo Niemeyer

unread,
Oct 21, 2013, 11:42:28 AM10/21/13
to Jackie Li, go-...@googlegroups.com
glib is a dependency of qt itself.

Have you seen the previous threads on the topic:

https://groups.google.com/forum/#!searchin/go-qml/glib

Do they help?
> --
> You received this message because you are subscribed to the Google Groups
> "go-qml" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to go-qml+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--

gustavo @ http://niemeyer.net

Jackie Li

unread,
Oct 21, 2013, 5:54:46 PM10/21/13
to go-...@googlegroups.com, Jackie Li
Finally! 

Hi Gustavo,

Firstly, thanks so much for making this library!

Here is the steps I went through to make it working: (on Windows 7 64bit)

* set GOARCH=386
* set CPATH=C:\MinGW\include;C:\Qt\Qt5.1.1\5.1.1\mingw48_32\include;C:\Qt\Qt5.1.1\5.1.1\mingw48_32\include\QtCore\5.1.1\QtCore
* set LIBRARY_PATH=C:\MinGW\lib;C:\Qt\Qt5.1.1\5.1.1\mingw48_32\lib
* set PATH=C:\Qt\Qt5.1.1\5.1.1\mingw48_32\bin;C:\MinGW\bin;%path% (!important, put Qt's path in front of MinGW's path otherwise it'll complain libstdc++-6.dll missing as Qt's path contains a different libstd++-6.dll)
* download pkg-config from http://sourceforge.net/projects/pkgconfiglite/files/ and select the latest version and extract to c:\MinGW\bin
* download glib dev version from http://www.gtk.org/download/win32.php and extract content to c:\MinGW

Then you should be able to go get/build the code.

Somewhere around those lines I think I did something else, but maybe they're not needed.

Hope this helps for whomever want to try it on Windows.


Thanks,
Jackie

Jackie Li

unread,
Oct 24, 2013, 7:13:40 AM10/24/13
to go-...@googlegroups.com, Jackie Li, Gustavo Niemeyer
Update: also need to install glib runtime from http://www.gtk.org/download/win32.php and extract to c:\MinGW
Reply all
Reply to author
Forward
0 new messages