title: LNK2019: unresolved external symbol in function
body: <p>I'm using VS2008 WinCE7. I'm facing linking error during build.</p>
  
  <p>The file system structure is</p>
  
  <pre><code>menu.c - ./menu.c
  eboot.h - ./eboot.h
  file_1.cpp - ./dir1/file_1.cpp
  </code></pre>
  
  <p>where <code>.</code> represents current directory</p>
  
  <p><strong>menu.c</strong></p>
  
  <pre><code>#include &lt;eboot.h&gt;
  
  static VOID OALWriteToEMMC(OAL_BLMENU_ITEM *pMenu);
  
  VOID OALWriteToEMMC(OAL_BLMENU_ITEM *pMenu)
  {
       OALTestEMMC();
  }
  </code></pre>
  
  <p><strong>file_1.cpp</strong></p>
  
  <pre><code>#include &lt;eboot.h&gt;
  
  VOID OALTestEMMC();
  
  VOID OALTestEMMC()
  {
  //some code
  }
  </code></pre>
  
  <p><strong>eboot.h</strong></p>
  
  <pre><code> VOID OALTestEMMC();
  </code></pre>
  
  <p>I'm getting the error </p>
  
  <pre><code>menu.obj : error LNK2019: unresolved external symbol OALTestEMMC referenced in function OALWriteToEMMC
  </code></pre>
  
  <p>Please guide me how to solve it.</p>
  
  <p><strong>EDIT1:</strong></p>
  
  <p><strong>menu.c</strong></p>
  
  <pre><code>#ifdef __cplusplus
  extern "C" VOID OALTestEMMC();
  #endif
  </code></pre>
  
  <p>and removed the declaration in <code>eboot.h</code> and added it in <code>file_1.cpp</code>
  But, the error persists.</p>