Re: Linking errors



On Wed, 2006-04-26 at 09:20 +0100, Alex Buell wrote:
> On Wed, 26 Apr 2006 10:16:06 +0200 Murray Cumming <murrayc murrayc com>
> > > I solved it - needed to use GTKMM_* (in capital letters). Why do the
> > > headers not reflect this? gtk/glib doesn't do this.
> > 
> > Please be more specific. I'm not sure what you mean.
> 
> In gtkmm.h, these are defined:
> gtkmm.h:extern const int gtkmm_major_version;
> gtkmm.h:extern const int gtkmm_minor_version;
> gtkmm.h:extern const int gtkmm_micro_version;

I think the "extern" there just means that the current file would like
to use these variables, which would theoretically be declared elsewhere.
I don't think it actually declares them in gtkmm.h. Actually, these
symbols don't seem to be used anywhere.

I guess these are cruft left over from something or other. We should
probably remove them.

> But when I use them in my code, I get linkage errors as above.
> Eventually I was told if I used the following I wouldn't get linkage
> errors:
> 
> GTKMM_MAJOR_VERSION
> GTKMM_MINOR_VERSION
> GTKMM_MICRO_VERSION
> 
> I did so, and linking was successful. I thought that was quite strange.

These are defined in gtkmmconfig.h. I guess we should add some
documentation for them.

regexxer is a good way to search through the sources if you need to.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]