title: CUnit : undefined reference to `CU_assertImplementation'
body: <h2>compiled it using : <strong>cc -o test testtest.c -lcunit</strong> , but still cant run the tests properly. they crash for some reason :)</h2>
  
  <p>I'm working on a project and i have recently convinced myself that i should continue in an testdriven approach. Mainly because the project itself is growing and i want proof of that all functions work.</p>
  
  <p>But i bump into some problems while doing a cunit tutorial.
  <a href="http://cunit.sourceforge.net/doc/writing_tests.html" rel="nofollow noreferrer">http://cunit.sourceforge.net/doc/writing_tests.html</a></p>
  
  <p>This is my cunit test file :</p>
  
  <pre><code>#include &lt;CUnit/CUnit.h&gt;
  
  main(){
      test_maxi();
  }
  
  int maxi(int i1, int i2){
        return (i1 &gt; i2) ? i1 : i2;
  }
  
  void test_maxi(void){
    CU_ASSERT(maxi(0,2) == 2);
    CU_ASSERT(maxi(0,-2) == 0);
    CU_ASSERT(maxi(2,2) == 2);
   }
  </code></pre>
  
  <p>i get these errors when i try to compile it :</p>
  
  <blockquote>
    <p>testtest.c:(.text+0x62): undefined reference to
    <code>CU_assertImplementation' testtest.c:(.text+0x9b): undefined reference
    to</code>CU_assertImplementation' testtest.c:(.text+0xd5): undefined
    reference to `CU_assertImplementation' collect2: ld returned 1 exit
    status</p>
  </blockquote>
  
  <p>I used google and i think it got something todo with linking? But i didnt get much help out of it.</p>
  
  <p>Best Regards
  Rickard</p>