Re: GLIB_CHECK_VERSION (was: Glib rand() function)



Derek Simkowiak <dereks@kd-dev.com> writes:
> > > 	I want to use this in my code:
> > > 
> > > if (GLIB_CHECK_VERSION (1, 3, 0))
> > > 	[...use g_rand()...]
> > > else
> > > 	[...use rand()...]
> > 

Oh, you meant code, not configure.in... this won't work at all, you
are going to get undefined symbol g_rand().

> > Derek, you should know that 1.3 isn't supposed to be used in apps
> > yet... you can use AM_PATH_GLIB(1.4.0) for this.
> 
> 	1) What does AM_PATH_GLIB do, and where is it defined?  Note:
> 

glib.m4, it goes in configure.in, see gconf for an example.

> 	2) This isn't going into an application, per se.  It's going into
> a new data type that (I believe) will be generally useful.  When it's done
> (and I have some application code to demonstrate its usefulness) I will
> submit it for possible inclusion into Glib.  Is GLIB_CHECK_VERSION still
> inappropriate?
> 

Just use rand(), when you put it in glib you can worry about
portability....

Havoc



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