title: Undefined reference to 'function' using CodeBlocks
body: <p>I have the following error with a simple project to start learning with CodeBlocks.</p>
  <pre><code>E:\CodeBlocks\Projects\Triplet-CLEON-Benjamin\main.c|5|undefined reference to `initTriplet'|
  C:\msys64\mingw64\bin\..\lib\gcc\x86_64-w64-mingw32\12.1.0\..\..\..\..\x86_64-w64-mingw32\bin\ld.exe: E:\CodeBlocks\Projects\Triplet-CLEON-Benjamin\main.c|7|undefined reference to `AfficheTriplet'|
  </code></pre>
  <p>I have only 3 files in my project, which are the following:</p>
  <p><strong>main.c</strong></p>
  <pre><code>#include &quot;triplet.h&quot;
  
  int main()
  {
      triplet myTriplet = initTriplet(5,8,7);
  
      AfficheTriplet(myTriplet);
  
      return 0;
  }
  </code></pre>
  <p><strong>triplet.c</strong></p>
  <pre><code>#include &quot;triplet.h&quot;
  #include &lt;stdio.h&gt;
  
  void AfficheTriplet(triplet myTriplet)
  {
      printf(&quot;Triplet: \n\t Premier %d\n\t Second %d\n\t Troisieme %d&quot;, myTriplet.p, myTriplet.d, myTriplet.t);
  }
  
  triplet initTriplet(int a, int b, int c)
  {
      triplet myTriplet = {a,b,c};
  
      return myTriplet;
  }
  </code></pre>
  <p><strong>triplet.h</strong></p>
  <pre><code>#ifndef TRIPLET_H_INCLUDED
  #define TRIPLET_H_INCLUDED
  
  typedef struct triplet triplet;
  struct triplet
  {
      int p;
      int d;
      int t;
  };
  
  triplet triTripletV1(triplet myTriplet);
  void    triTripletV2(triplet myTriplet);
  
  void AfficheTriplet(triplet myTriplet);
  triplet initTriplet(int a, int b, int c);
  
  #endif // TRIPLET_H_INCLUDED
  </code></pre>
  <p>In my main file, if I include triplet, running works else if I include triplet.h I have the previous errors.</p>
  <p>Also, my project is built as</p>
  <ul>
  <li>ProjectName
  <ul>
  <li>Sources
  <ul>
  <li>main.c</li>
  <li>triplet.c</li>
  </ul>
  </li>
  <li>Headers
  <ul>
  <li>triplet.h</li>
  </ul>
  </li>
  </ul>
  </li>
  </ul>
  <p>Any help, please?</p>