Re: [gtk-list] Re: strcasecmp in gtkcombo.c



Paolo Molaro wrote:

On Fri, Jan 30, 1998 at 12:38:39PM -0500, Jim Whitby wrote:

> > I'm getting the following error compiling gtk+-0.99.3 on Unixware 2.1.2
> > system.
> > Using gcc 2.7.2
> >
> > gtkcombo.c:151: `strcasecmp' undeclared (first use this function)
>
> It seems that Unixware doesn't have the strcasecmp function in
> the <string.h> header (and maybe also in libc).

A grep on usr/include finds it in   strings.h  ( yes with an  s  and yes there
is a  string.h also ).

Should I add this as an include? or just leave what works alone?

Also found strcasecmp in several libs including libc.

> strcasecmp is a BSD feature that's also in Linux and Solaris:
> should we provide a g_strcasecmp function in glib (or should people
> get rid of unixware:-)?
>
> In the mean time you can change that code to read:
>
> /*  if (combo->case_sensitive)*/
>       string_compare = strcmp;
> /*  else
>       string_compare = strcasecmp;*/
>
> and you will get always case-sensitive compares...

That allowed it to compile just fine! Thank you very much!

>
>
> lupus

I do have an additional   problem.....

In compiling gimp 99.18 in the plug-in/fuse dir. The following:

gcc -I//usr/X/include -g -O2 -Wall -o fuse -L//usr/X/lib -lgtk -lgdk -lglib
-lXe
xt -lX11 -lsocket -lm fuse.o ../../plug-ins/megawidget/megawidget.o
../../libgim
p/.libs/libgimpui.a ../../libgimp/.libs/libgimp.a
../../plug-ins/libgck/gck/.lib
s/libgck.a -L//usr/X/lib -lgtk -lgdk -lglib -lXext -lX11 -lsocket -lm -lc
Undefined                       first referenced
 symbol                             in file
srandom                             fuse.o
random                              fuse.o

I really don't understand this, because srandom and random are both in
libX11.so.1 !!

Hope I'm not being just stupid here.

Jim





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