[Tux4kids-tuxtype-dev] Tux4kids-tuxtype-dev Digest, Vol 16, Issue 9

David Bruce davidstuartbruce at gmail.com
Mon Mar 9 13:45:36 UTC 2009


Hi Ranjith,

On Mon, Mar 9, 2009 at 7:02 AM, ranjith kannikara
<ranjithkannikara at gmail.com> wrote:
> Hi,
> In the tux math installation from source during make there is warning '
> version redefined ' its arising due to the assigning of the version 1.7.2 to
> VERSION in the config.h

The "version redefinition" warning has been present in both tuxmath
and tuxtype ever since they have been built with autotools - it is not
related to gcc versions. I am pretty sure it is something we can
safely ignore, although I would love to be rid of it.

I have done a lot of googling into this, and AFAICT this warning
arises if the code somehow #includes a "config.h" file from one of the
lib package dependencies (which of course will define its own VERSION
for the lib).  VERSION then gets redefined in our program's
"config.h", leading to the warning.

Using grep "#define VERSION" on all the headers we directly include
doesn't turn up anything, as it shouldn't.  I'm not that familiar with
writing libraries, but I've read that their public includes should not
contain anything from their own "config.h" (if they use one).

The error says the redefinition took place on the command-line:

In file included from ../../trunk/src/globals.h:28,
                 from ../../trunk/src/generate_lesson.c:5:
../config.h:453:1: warning: "VERSION" redefined
<command-line>: warning: this is the location of the previous definition

which I assume means it was in a script run at configure time.

So I basically gave up on trying to figure this one out.  If anyone
has any insight into this one, feel free to post it.

Cheers,

David



More information about the Tux4kids-tuxtype-dev mailing list