title: Issue with C and Golang integration
body: <p>I have a C shared library named libtest.so which in turn use another shared library lihelp.so.
  The code for libtest.so use dlopen() to load the libhelp.so</p>
  
  <p>I have integrated libtest.so with my GO script gotest.go</p>
  
  <p>When I run gotest.go after building and installing, I am seeing libtest.so is getting loaded successfully and function in libtest is executed successfully.
  But the dlopen() call in libtest.so to load libhelp.so is failining with error "undefined symbol: dlopen"</p>
  
  <p>But if I write a C application which use libtest.so all execution are fine withour any error.</p>
  
  <p>Here is the code snippet of my Go file</p>
  
  <pre><code>/*
   #cgo CFLAGS: -I./include
   #cgo LDFLAGS: -L. -ltest -ldl
  */
  </code></pre>
  
  <p>Here is the Makefile entry for building libtest.so</p>
  
  <pre><code>CC = gcc # C compiler
  CFLAGS = -c -fPIC -I./include # C flags
  LDFLAGS = -shared -L/lib -ldl # linking flags
  </code></pre>
  
  <p>Can any one suggest what can be the problem?</p>
  
  <hr>
  
  <p>Output of ldd of my go binary</p>
  
  <pre><code>ldd app
      linux-gate.so.1 =&gt;  (0xb77c3000)
      libtest.so =&gt; ./libtest.so (0xb77bc000)
      libgo.so.5 =&gt; /usr/lib/i386-linux-gnu/libgo.so.5 (0xb6ed0000)
      libgcc_s.so.1 =&gt; /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6eb2000)
      libc.so.6 =&gt; /lib/i386-linux-gnu/libc.so.6 (0xb6d03000)
      /lib/ld-linux.so.2 (0xb77c4000)
      libpthread.so.0 =&gt; /lib/i386-linux-gnu/libpthread.so.0 (0xb6ce7000)
      libm.so.6 =&gt; /lib/i386-linux-gnu/libm.so.6 (0xb6ca1000)
  </code></pre>