Monday, February 02, 2009

Changing the version of required gtk+

Sometimes you download a source code and it keeps asking you another (generally higher) version of gtk+ or libglade. For this problem, instead of changing your gtk+ and glade versions, you might just change the requirements of the source code you downloaded. This is not a guaranteed solution, but most of the time, it works. For example, I have gtk+ 2.8 at home and 2.4 at work. So, at work I can not compile my gtk+ codes. To tackle the problem, I found where the configure script checks for the gtk+ requirements and just changed the version number.
It looks like this(configure.ac file):
PKG_CHECK_MODULES(GRID_EDITOR, [gtk+-2.0 >= 2.8 libglade-2.0 >= 2.6 ])
Depending on your code and configuration, there might be more options, but changing the above to this does the trick for me.
PKG_CHECK_MODULES(GRID_EDITOR, [gtk+-2.0 >= 2.4 libglade-2.0 >= 2.4 ])

No comments: