title: Redefined symbol in multiple c code with #ifndef directive
body: <p>I have a stupid problem and I don't see where it comes from. I took care of using #ifndef directive to make sure all my #include are not redefined. Sadly for three of them that's happening. Here my multiple files arch :</p>
  
  <p>t_include.h</p>
  
  <pre><code>#ifndef T_INCLUDE_H_
  #define T_INCLUDE_H_
  
  /* Project specific dependencies*/
  #include "utilities.h"
  #include "fsp_function.h"
  
  #include "ti/csl/csl_tsc.h"
  #include "ti/csl/csl_cache.h"
  #include "ti/csl/csl_cacheAux.h"
  
  #include "ti_sp_complex_convolution_A_input1.h"
  #include "ti_sp_complex_convolution_A_input2.h"
  #include "to_sp_complex_convolution_A_output.h"
  
  #endif /* T_INCLUDE_H_ */
  </code></pre>
  
  <p>t_function.h</p>
  
  <pre><code>#ifndef T_FUNCTION_H_
  #define T_FUNCTION_H_
  
  #include "t_include.h"
  
  /*output vector*/
  #define INPUT1A_LENGTH  5000
  #define INPUT2A_LENGTH  2800
  #define OUTPUTA_LENGTH  2202
  extern FLOAT32 sp_complex_convolution_A_output_thales[OUTPUTA_LENGTH];
  
  /*misc parameter*/
  #define CPU_CLOCK_KHZ           1400000
  #define CPU_CLOCK_MS            1/CPU_CLOCK_KHZ
  #define FIR_NB_MACS             INPUT1A_LENGTH * OUTPUTA_LENGTH     /*   FIR algorithm complexity */
  #define NB_OF_REP               10
  #define UMA_L2CACHE_L1DCACHE    0
  
  /* Project specific types */
  typedef struct{
  ect...
  </code></pre>
  
  <p>And now c file only include t_function.h :</p>
  
  <p>t_function.c</p>
  
  <pre><code>/* Dependencies */
  #include "t_function.h"
  FLOAT32 sp_complex_convolution_A_output_thales[OUTPUTA_LENGTH];
  /* API  */
  etc...
  </code></pre>
  
  <p>And t_main_function.c</p>
  
  <pre><code>/* dependencies */
  #include "t_function.h"
  void main(void) {
  etc...
  </code></pre>
  
  <p>It should work but during linking here the errors comming :</p>
  
  <pre><code>&lt;Linking&gt;
  error #10056: symbol "sp_complex_convolution_A_output" redefined: first defined in "./TEST/t_function.obj"; redefined in "./TEST/t_main_function.obj"
  error #10056: symbol "sp_complex_convolution_A_input2" redefined: first defined in "./TEST/t_function.obj"; redefined in "./TEST/t_main_function.obj"
  error #10056: symbol "sp_complex_convolution_A_input1" redefined: first defined in "./TEST/t_function.obj"; redefined in "./TEST/t_main_function.obj"
  
  error #10056: symbol "sp_complex_convolution_A_output_thales" redefined: first defined in "./TEST/t_function.obj"; redefined in "./TEST/t_main_function.obj"
  &gt;&gt; Compilation failure
  error #10010: errors encountered during linking; "CONVOLUTION_COMPLEX.out" not built
  </code></pre>
  
  <p>So the error only com from three  symbol sp_complex_convolution_A_output, sp_complex_convolution_A_input1 and sp_complex_convolution_A_input2 Which are defined in their own .h which is also protected by #ifndef directives:      </p>
  
  <p>ti_sp_complex_convolution_A_input1.h</p>
  
  <pre><code>#ifndef __TI_SP_COMPLEX_CONVOLUTION_A_INPUT1_H_
  #define __TI_SP_COMPLEX_CONVOLUTION_A_INPUT1_H_
  
  FLOAT32 sp_complex_convolution_A_input1[2 * 2500] = {
  etc... 
  </code></pre>
  
  <p>And the same for the other two...</p>
  
  <p>So I really don't know why it is happening.
  Thx for helping</p>