title: Multiple definition of ... linker error
body: <p>I defined a special file: <code>config.h</code></p>
  
  <p>My project also has files:</p>
  
  <pre><code>t.c, t.h
  pp.c, pp.h
  b.c b.h
  l.cpp
  </code></pre>
  
  <p>and #includes:</p>
  
  <p><strong>in t.c:</strong></p>
  
  <pre><code>    #include "t.h"
      #include "b.h"
      #include "pp.h"
      #include "config.h"
  </code></pre>
  
  <p><strong>in b.c:</strong> </p>
  
  <pre><code>    #include "b.h"
      #include "pp.h"
  </code></pre>
  
  <p><strong>in pp.c:</strong></p>
  
  <pre><code>    #include "pp.h"
      #include "config.h"
  </code></pre>
  
  <p><strong>in l.cpp:</strong></p>
  
  <pre><code>    #include "pp.h"
      #include "t.h"
      #include "config.h"
  </code></pre>
  
  <p>there are no include directives in my <code>*.h</code> files, only in <code>*.c</code> files. I defined this in config.h:</p>
  
  <pre><code>const char *names[i] =
          {
              "brian", "stefan", "steve"
          };
  </code></pre>
  
  <p>and need that array in l.cpp, t.c, pp.c but Im getting this error:</p>
  
  <pre><code>pp.o:(.data+0x0): multiple definition of `names'
  l.o:(.data+0x0): first defined here
  t.o:(.data+0x0): multiple definition of `names'
  l.o:(.data+0x0): first defined here
  collect2: ld returned 1 exit status
  make: *** [link] Error 1
  </code></pre>
  
  <p>I have include guards in every <code>*.h</code> file I use in my project. Any help solving this?</p>