• Create Account

### #ActualLaval B

Posted 29 May 2012 - 12:50 PM

Are you including the same header file in multiple files ?

You may need to enclose the definitions in the header by a set of directives like so

#if !defined(SOME_CONSTANTE_OF_YOUR_CHOICE)
#define		SOME_CONSTANTE_OF_YOUR_CHOICE
#endif


Event if those definitions are only found in one file, if the file is included in multiple other files (directly or indirectly), they will be difined multiple times.

I don't know Dev C++ nor the compiler you are using but #pragma once may also work.

I hope this helps.

### #2Laval B

Posted 29 May 2012 - 12:49 PM

Are you including the same header file in multiple files ?

You may need to enclose the definitions in the header by a set of directives like so

#if !defined(SOME_CONSTANTE_OF_YOUR_CHOICE)
#define		SOME_CONSTANTE_OF_YOUR_CHOICE
#endif


Event if those definitions are only found in one file, if the file is included in multiple other files (directly or indirectly), they will be difined multiple times.

I don't know Dev C++ nor the compiler you are using but #pragma once may also work.

### #1Laval B

Posted 29 May 2012 - 12:46 PM

Are you including the same header file in multiple files ?

You may need to enclose the definitions in the header by a set of directives like so

#if !defined(SOME_CONSTANTE_OF_YOUR_CHOICE)
#define	    SOME_CONSTANTE_OF_YOUR_CHOICE