title: Getting undefined reference in Shared Library
body: <p>I have created an sample shared library, that uses libcurl. Here is the corresponding Makefile to create shared library:</p>
  
  <pre><code>CC= arm-none-linux-gnueabi-gcc
  CPPFLAGS= -I/home/yuvi/development/libcurl/curl-7.24.0/build_arm/include -Wall -g 
  LDFLAGS= -L/home/yuvi/development/libcurl/curl-7.24.0/build_arm/lib \
      -l:libcurl.a -l:libssh2.a -l:libssl.a -l:libcrypto.a  \
      -L/home/yuvi/development/CD/VAR-SOM-OM35_VAR-SOM-OM37_VAR-SOM-AM35/Software/Linux/host_tools/linux/arm-2009q3/arm-none-linux-gnueabi/libc/lib -lrt 
  
  all: resume.o libresume.so
  
  resume.o:
      $(CC) $(CPPFLAGS) -c -fPIC resume_download.c -o resume_download.o $(LDFLAGS) 
  
  libresume.so:
      $(CC)  -shared -Wl,-soname,libresume.so.1 -o libresume.so  resume_download.o
  
  clean:
      rm -f resume_download.o libresume.so
  </code></pre>
  
  <p>Now I have created one sample program that gonna to use this shared library, the Makefile for that program is :</p>
  
  <pre><code>CC= arm-none-linux-gnueabi-gcc
  CPPFLAGS= -I/home/yuvi/development/libcurl/curl-7.24.0/build_arm/include -Wall -g 
  LDFLAGS= -L/home/yuvi/development/libcurl/curl-7.24.0/build_arm/lib \
      -l:libcurl.a -l:libssh2.a -l:libssl.a -l:libcrypto.a  \
      -L/home/yuvi/development/CD/VAR-SOM-OM35_VAR-SOM-OM37_VAR-SOM-AM35/Software/Linux/host_tools/linux/arm-2009q3/arm-none-linux-gnueabi/libc/lib -lrt \
      -L/home/yuvi/development/libcurl/sample_program -lresume 
  
  all:
      $(CC) $(CPPFLAGS) resume_app.c -o app $(LDFLAGS)
  </code></pre>
  
  <p>But If I make the above Makefile, I am getting the following errors :</p>
  
  <pre><code>/home/yuvi/development/libcurl/sample_program/libresume.so: undefined reference to `curl_easy_setopt'
  /home/yuvi/development/libcurl/sample_program/libresume.so: undefined reference to `curl_global_cleanup'
  /home/yuvi/development/libcurl/sample_program/libresume.so: undefined reference to `curl_easy_init'
  /home/yuvi/development/libcurl/sample_program/libresume.so: undefined reference to `curl_easy_perform'
  /home/yuvi/development/libcurl/sample_program/libresume.so: undefined reference to `curl_easy_cleanup'
  /home/yuvi/development/libcurl/sample_program/libresume.so: undefined reference to `curl_global_init
  </code></pre>
  
  <p>Now how can I eliminate these error, Is there something wrong in creating shared library or compiling sample program. 
  Please Help....!</p>