This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: redefinition of `struct mallinfo' when building application
- To: Ivan Jakab <ivan at INTESIS dot hr>
- Subject: Re: [ECOS] redefinition of `struct mallinfo' when building application
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 17 May 2001 07:53:19 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <000e01c0dde8$222eaf90$8200a8c0@ivan>
Ivan Jakab wrote:
>
> >
> > Ivan Jakab wrote:
> > > > >
> > > > > It seems that, in every file where <stdlib.h> is included, I'm
> > > > getting the
> > > > > "redefinition of `struct mallinfo'" error message. Does
> > anybody have
> > > [snip]
> > > Now I see that I didn't mention that this message appears
> > during application
> > > building. It seems that it comes up in every file where I have
> > to include
> > > <stdlib.h>. Any ideas?
> > >
> > > eCos builds fine though. No such messages while building eCos.
> >
> > Still, it should see where the redefinition occurred, and where the
> > original definition was. What does it say?
> >
>
> While building my application, on the first file which includes stdlib.h,
> the compiler drops:
>
> In file included from ../../../../work/src/utils/memwatch.h:329,
> from ../../../../work/src/multiplatform/work.h:42,
> from mips_exc.c:20:
> /ecos/test/test_install/include/stdlib.h:206: redefinition of `struct
> mallinfo'
> make[1]: *** [release/mips_exc.o] Error 1
Oh, I was rather expecting it to see where the original definition was. In
that case the way to find it is to compile this file with --save-temps.
Then in the current directory you'll find a mips_exc.ii file which is the
file after preprocessing. Search through that for mallinfo and you'll
hopefully find where the other definition is coming from (probably some
headers you've imported, e.g. perhaps that memwatch.h?).
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine