Quantcast

redefinition error in stdio.h or math.h

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

redefinition error in stdio.h or math.h

James Yan
hey all,

I use minGW5.1.4 on windows XP, and i try to use the included gcc to compile my source codes(written in standard c), and then get a lot of "redefinition error", i dont know why, does anybody could give me a hint?  i've searched google for many times.
thanks!

regards,
J.Y.

===
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdio.h:393: error: re
definition of 'putchar'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdio.h:393: error: re
definition of 'putchar'
In file included from gutil.h:21,
                 from geo.c:11:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:452: error: red
efinition of 'sinhf'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:452: error: red
efinition of 'sinhf'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:456: error: red
efinition of 'coshf'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:456: error: red
efinition of 'coshf'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:460: error: red
efinition of 'tanhf'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:460: error: red
efinition of 'tanhf'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:482: error: red
efinition of 'expf'

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: redefinition error in stdio.h or math.h

JonY-2
On 1/7/2009 15:51, James Yan wrote:

> hey all,
>
> I use minGW5.1.4 on windows XP, and i try to use the included gcc to compile
> my source codes(written in standard c), and then get a lot of "redefinition
> error", i dont know why, does anybody could give me a hint?  i've searched
> google for many times.
> thanks!
>
> regards,
> J.Y.
>
> ===
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdio.h:393: error: redefinition of 'putchar'
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdio.h:393: error: redefinition of 'putchar'
> In file included from gutil.h:21,
>                   from geo.c:11:
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:452: error: redefinition of 'sinhf'
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:452: error: redefinition of 'sinhf'
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:456: error: redefinition of 'coshf'
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:456: error: redefinition of 'coshf'
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:460: error: redefinition of 'tanhf'
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:460: error: redefinition of 'tanhf'
> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:482: error: redefinition of 'expf'
>
>

Hi,
That's strange, stdio.h and math.h seems to be included twice, which
should not be possible with header guards.

Are you using the latest versions of w32api and mingwrt? If so, is is
possible to post the uncut errors? There seems to be more.

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Loading...