Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] (PR#8661) compile problem in gui-stuff.c
Home

[Freeciv-Dev] (PR#8661) compile problem in gui-stuff.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: brett.albertson@xxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#8661) compile problem in gui-stuff.c
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 3 May 2004 21:15:26 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8661 >

> [bretta - Mon May 03 19:05:17 2004]:
> 
> On Solaris 9 using gcc, I get a compile error in gui-stuff.c.  The
> compiler doesn't like the line:
> 
> ret[i] = _(s[i]);
> 
> If I change it to:
> 
> ret[i] = (char *)(s[i]);
> 
> everything compiles and works fine.

That's a very ugly "fix".  It doesn't actually fix anything, just hides
the problem.

Can you be more specific about the error?  What output does make give
you?  What is the exact line of compilation (what flags is gcc being given)?

I suspect that you are compiling with -Werror, and on your system
gettext returns a const char *.  Seems to me we should treat all
gettext-generated strings as const chars!  But we don't, and in a lot
more places than just client/gui-gtk/gui_stuff.c.

jason



[Prev in Thread] Current Thread [Next in Thread]