问题
I downloaded "strawberry-perl-5.12.2.0-portable" and "gtk+-bundle_2.22.1-20101227_win32". I extracted strawberry-perl in some directory and there I put gtk folder with gtk stuff.
In portableshell.bat I changed Path env and added: "%drivep%\gtk\bin;%drivep%\gtk\lib;". Don't ask me why I added lib directory, I saw that some guy added it in some website.
When I run in portableshell command: "pkg-config --libs --cflags gtk+-2.0" I get:
c:\test>pkg-config --libs --cflags gtk+-2.0
-mms-bitfields -Ic:/test/gtk/include/gtk-2.0 -Ic:/test/gtk/lib/gtk-2.0/include -
Ic:/test/gtk/include/atk-1.0 -Ic:/test/gtk/include/cairo -Ic:/test/gtk/include/g
dk-pixbuf-2.0 -Ic:/test/gtk/include/pango-1.0 -Ic:/test/gtk/include/glib-2.0 -Ic
:/test/gtk/lib/glib-2.0/include -Ic:/test/gtk/include -Ic:/test/gtk/include/free
type2 -Ic:/test/gtk/include/libpng14 -Lc:/test/gtk/lib -lgtk-win32-2.0 -lgdk-wi
n32-2.0 -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lgdk_pixb
uf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0
-lintl
All folders looks fine, I also have complete log of compiling glib here. It looks like it doesn't compile because pkg-config gives bad data, or something.
Does anyone have some idea how to make this thing work?
回答1:
If you insist on compilation, see http://perlmonks.com/?node_id=793472 for "build-gtk-glib-post.PL" , it worked for me ( be sure to use the download link )
Alternatively, use
ppm install Bundle::Gnome2
Its available from both the ActiveState and trouchelle repositories ( see http://kobesearch.cpan.org/dist/Bundle-Gnome2 )
来源:https://stackoverflow.com/questions/5322493/installing-gtk2-on-portable-strawberry