Jump to content

How to compile gtk-1.2+ applications on MDK-9.1?


zero0w
 Share

Recommended Posts

I have come across some XMMS plugins which I need to compile myself, but they are based on Gtk-1.2+ widget; and since Mdk-9.0 the development libraries for Gtk-1.2+ are installed in the directory /usr/include/gtk/gtk-1.2.

 

However, most source code headers are instead pointing to <gtk>, for eg.: #include <gtk/*.h>, so how can I work around this path difference to allow those Gtk-1.2+ programs to be compiled on Mdk-9.1? Your help is really appreciated.

Link to comment
Share on other sites

Are you sure ALL 1.2 and 2 devel rpms are installed. This shouldn't be any different than compiling a 1.2 gtk theme engine. Are you getting error messages? What are they exactly?

 

What do you get with;

rpm -qa | grep gtk

 

or, what happens when you do;

urpmi gtk

Link to comment
Share on other sites

I did. It's just that in compilation gcc complaint it can't locate the header files, which I suppose is because of a different path location.

 

I believe it is that /usr/include/gtk will be assigned for header files for developing Gtk-1.2+ applications.

Link to comment
Share on other sites

Yes, I did.

 

You see, the thing is, the XMMS plugin compilation depends on <xmms/plugin.h>, which depends on <gtk/gtk.h> and <glib/glib.h>, which then again depends on other <gtk/*.h> and <glib/*.h>. The thing is I believe most Gtk programs out there are migrating Gtk-2.x, hence this trouble of defining <gtk> headers. What does <gtk/gtk.h> means now? How to tell it's a header for Gtk-1.x+ apps or Gtk-2.x apps?

 

Now that I wonder, I've figured maybe a (very) dirty trick to get around this is possible.

 

Well, just rename or re-locate the header directory during compilation, or use symlink to fake the directory to pretend it is in the correct path location. For eg. first rename /usr/include/gtk. After compilation, the symlink can be removed and the directory renamed back to their original naming.

 

This trick sounds like an ancient lost art, but it might just work. I am going to try it later.

 

I am not sure if there's an option to change the path of finding header files; maybe there's one, and hence what I am doing here :wink: .

Link to comment
Share on other sites

do the plugins have a configure script? if so, you could always check to see if it allows your to tell it where to find the libraries. just

./configure --help

and look for an option like:

--with-gtk-lib-dir=

--with-gtk-source-dir=

or something to that effect. i used to have to do this all the time when I compiled things on my own, because Mandrake would put libraries and such in unstandard locations.

Link to comment
Share on other sites

hmmm.....what plugin are you trying to install? maybe when i get home i can take a gander and see if i can famigure it out. if it's more than one just give me one example.

 

'course, i probably won't have more luck than you are having.

Link to comment
Share on other sites

No configure script either.
This usually means the compiler will get the 'configure' options from the make file. It's the same thing just less friendly for the end user. It requires the 'make' environment commands as opposed to the 'configure' options. Like instead of

--with-gtk-libdir=

something like

$LIBDIR=

 

It's been a while so these are just guesses, and I'm on a 2 day old install because of hardware probs, so I don't have anything to reference right now, but just as tyme offered, I too will take a gander. :wink:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...