C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 11-24-2008, 07:09 AM   #1
Registered User
 
Join Date: Mar 2008
Location: Fortaleza
Posts: 6
Question Error: redefinition of typedef xxxx

Hello, I'm trying to compile my .C and I got this errors... The header file (gauge.h) is a SDK of a game (from Micro$oft).

I opened the file and preprocessor tags for preventing twice include has been found.
Any Idea? The header I'm using can be found here: http://pastebin.com/m6b3d71cf just to show you the lines I'm gettting errors

Thanks for reading my thread even you can't help me.

Code:
#ifndef GAUGE_H__
#define GAUGE_H__

...

#endif
Code:
C:\beep\beep\gauge.h|5114|error: redefinition of typedef 'PELEMENT_STATIC_IMAGE'|
C:\beep\beep\gauge.h|5076|error: previous declaration of 'PELEMENT_STATIC_IMAGE' was here|
C:\beep\beep\gauge.h|5114|error: redefinition of typedef 'PPELEMENT_STATIC_IMAGE'|
C:\beep\beep\gauge.h|5076|error: previous declaration of 'PPELEMENT_STATIC_IMAGE' was here|
C:\beep\beep\gauge.h|5167|error: redefinition of typedef 'PELEMENT_NEEDLE'|
C:\beep\beep\gauge.h|5077|error: previous declaration of 'PELEMENT_NEEDLE' was here|
C:\beep\beep\gauge.h|5167|error: redefinition of typedef 'PPELEMENT_NEEDLE'|
C:\beep\beep\gauge.h|5077|error: previous declaration of 'PPELEMENT_NEEDLE' was here|
C:\beep\beep\gauge.h|5270|error: redefinition of typedef 'PELEMENT_STRING'|
C:\beep\beep\gauge.h|5078|error: previous declaration of 'PELEMENT_STRING' was here|
C:\beep\beep\gauge.h|5270|error: redefinition of typedef 'PPELEMENT_STRING'|
C:\beep\beep\gauge.h|5078|error: previous declaration of 'PPELEMENT_STRING' was here|
C:\beep\beep\gauge.h|5363|error: redefinition of typedef 'PELEMENT_SLIDER'|
C:\beep\beep\gauge.h|5079|error: previous declaration of 'PELEMENT_SLIDER' was here|
C:\beep\beep\gauge.h|5363|error: redefinition of typedef 'PPELEMENT_SLIDER'|
C:\beep\beep\gauge.h|5079|error: previous declaration of 'PPELEMENT_SLIDER' was here|
C:\beep\beep\gauge.h|5430|error: redefinition of typedef 'PELEMENT_ICON'|
C:\beep\beep\gauge.h|5080|error: previous declaration of 'PELEMENT_ICON' was here|
C:\beep\beep\gauge.h|5430|error: redefinition of typedef 'PPELEMENT_ICON'|
C:\beep\beep\gauge.h|5080|error: previous declaration of 'PPELEMENT_ICON' was here|
C:\beep\beep\gauge.h|5503|error: redefinition of typedef 'PELEMENT_MOVING_IMAGE'|
C:\beep\beep\gauge.h|5081|error: previous declaration of 'PELEMENT_MOVING_IMAGE' was here|
C:\beep\beep\gauge.h|5503|error: redefinition of typedef 'PPELEMENT_MOVING_IMAGE'|
C:\beep\beep\gauge.h|5081|error: previous declaration of 'PPELEMENT_MOVING_IMAGE' was here|
C:\beep\beep\gauge.h|5588|error: redefinition of typedef 'PELEMENT_SPRITE'|
C:\beep\beep\gauge.h|5082|error: previous declaration of 'PELEMENT_SPRITE' was here|
C:\beep\beep\gauge.h|5588|error: redefinition of typedef 'PPELEMENT_SPRITE'|
C:\beep\beep\gauge.h|5082|error: previous declaration of 'PPELEMENT_SPRITE' was here|
C:\beep\beep\gauge.h|5863|warning: useless keyword or type name in empty declaration|
C:\beep\beep\gauge.h|5960|warning: useless keyword or type name in empty declaration|
||=== Build finished: 28 errors, 4 warnings ===|
Rocha is offline   Reply With Quote
Old 11-24-2008, 07:24 AM   #2
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
There are two definitions of PELEMENT_STATIC_IMAGE in that file. Don't ask me why, but if there are two definitions of the same typedef, then I'd expect the compiler to give that error.

If you go to line 5076, and make that about the top of the screen, you can see line 5114 which defines the same type again.

--
Mats
__________________
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
matsp is offline   Reply With Quote
Old 11-24-2008, 09:19 AM   #3
Registered User
 
slingerland3g's Avatar
 
Join Date: Jan 2008
Location: Seattle
Posts: 575
You may want to check for any missing ';' as well that ends a 'c' statement.
slingerland3g is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting an error with OpenGL: collect2: ld returned 1 exit status Lorgon Jortle C++ Programming 6 05-08-2009 08:18 PM
Need help understanding info in a header file hicpics C Programming 8 12-02-2005 12:36 PM
Please STICKY this- vital to MSVC 6 dev - BASETSD.h Bubba Game Programming 11 03-15-2005 09:22 AM
build errors migrated from dx9b to dx9c sdk reanimated Game Programming 4 12-17-2004 07:35 AM
oh me oh my hash maps up the wazoo DarkDays C++ Programming 5 11-30-2001 12:54 PM


All times are GMT -6. The time now is 10:15 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22