The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2005
Registered User
 

Join Date: Feb 2005
Posts: 40
Help

i have a struct defined in a .h file

now 2 other C files are in cluding this .h file

so during make file i get a error sayiny that the variables in this structure are being redifined

how do i encounter this

i would also like to know what causes this
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-22-2005
Registered User
 

Join Date: Feb 2005
Posts: 6
Quote:
Originally Posted by wojtyla
i have a struct defined in a .h file

now 2 other C files are in cluding this .h file

so during make file i get a error sayiny that the variables in this structure are being redifined

how do i encounter this

i would also like to know what causes this
Are you including that header file in any other header file.
If Yes, that may due to multiple inclusion of that header file, may be included indirectly from some other header file.
Reply With Quote
  #3 (permalink)  
Old 02-22-2005
Registered User
 

Join Date: Feb 2005
Posts: 40
re

Found the mistake

a stupid one to

Didnt do A #ifndef
#endif
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0