title: "undefined reference" when linking against a static library
body: <p>g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5</p>
  
  <p>I have the following static library called sdpAPI.a. I am having problems trying to link it with my test application. Just wondering if I am doing something wrong. The static library has been built with g++;</p>
  
  <p>My directory is as follows:</p>
  
  <pre><code>/projects/unit_test/main.c
  /projects/unit_test/sdp/inc/sdpAPH.h
  /projects/unit_test/sdp/lib/sdpAPI.a
  </code></pre>
  
  <p>My source code is this:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  #include "sdpAPI.h"
  
  int main(void)
  {
      printf("----- TEST SDP ------\n");
  
      try {
          sdpSessionDescription sdp;
          sdp.clear();
      }
      catch(...) {
          printf("----- TEST FAILED --------\n");
          return 0;
      }
  
      printf("------ TEST SUCCESSFULL ------\n");
  
      return 0;
  }
  </code></pre>
  
  <p>And my Makefile is this:</p>
  
  <pre><code>OBJECT_FILES = main.o
  CC = g++
  CFLAGS = -Wall -Wextra -Wunreachable-code -ggdb -O0
  TARGET = sdp_demo
  
  INC_PATH = -I sdp/inc
  LIB_PATH = -L sdp/lib/sdpAPI.a
  
  $(TARGET): $(OBJECT_FILES)
   $(CC) $(CFLAGS) $(INC_PATH) $(LIB_PATH) $(OBJECT_FILES) -o $(TARGET)
  
  main.o: main.c
   $(CC) $(CFLAGS) $(INC_PATH) $(LIB_PATH) -c main.c
  
  clean:
   rm -f $(TARGET) $(OBJECT_FILES) *~
  </code></pre>
  
  <p>These are the linker errors I am getting:</p>
  
  <pre><code>undefined reference to `sdpSessionDescription::sdpSessionDescription()'
  undefined reference to `sdpSessionDescription::clear()'
  undefined reference to `sdpSessionDescription::~sdpSessionDescription()'
  undefined reference to `sdpSessionDescription::~sdpSessionDescription()'
  </code></pre>
  
  <p>Many thanks for any suggestions,</p>