title: C++ Linker Error (Unresolved External) when linking to /clr DLL
body: <p>I have a DLL with the /clr option ON. I have the following declaration in my DLL:</p>
  
  <pre><code>int __declspec(dllexport) __cdecl  test();
  </code></pre>
  
  <p>Also, I have a console with /clr option ON. And have the following declaration on my main.cpp file:</p>
  
  <pre><code>int __declspec(dllimport) __cdecl  test();
  </code></pre>
  
  <p>I added the Reference to the DLL project on the property settings of my console application. But I still get unresolved externals from the compiler about the test function.</p>
  
  <p>I managed to compile by manually adding a reference to the lib file generated by the compiler. But then I can't hit breakpoints inside the DLL functions (it says the source code is different from the original version or the symbols have not been loaded...)</p>
  
  <p>Can someone help me?</p>