title: Linker error calling C function from C++ despite using EXTERN "C"
body: <p>I am using this library
  <a href="http://rtmpdump.mplayerhq.hu/librtmp.3.html" rel="nofollow">http://rtmpdump.mplayerhq.hu/librtmp.3.html</a> which is written in C.
  It already uses extern "C" on all of its definitions. But still when I call a function from my [main.cpp] file,, compiler shows these errors:</p>
  
  <pre><code>[1&gt;main.obj : error LNK2028: unresolved token (0A00000F) "extern "C" struct RTMP * 
   __cdecl RTMP_Alloc(void)" (?RTMP_Alloc@@$$J0YAPAURTMP@@XZ) referenced in function "int 
   __cdecl main(void)" (?main@@$$HYAHXZ)]
  
  [1&gt;main.obj : error LNK2019: unresolved external symbol "extern "C" struct RTMP * 
   __cdecl RTMP_Alloc(void)" (?RTMP_Alloc@@$$J0YAPAURTMP@@XZ) referenced in function "int 
   __cdecl main(void)" (?main@@$$HYAHXZ)]
  </code></pre>
  
  <p>I am using Visual Studio 2008. And there is no compilation error.
  What am I missing?</p>