title: Linking assembly function .asm to c++ project in Visual Studio 2012
body: <p>I've created in windows c++ project in Visual Studio to learn how to write asm functions. 
  So in my project I've got hello.asm with this simple code:</p>
  
  <pre><code>.686
  .MODEL FLAT
  .STACK
  .DATA 
  .CODE
  
  hello PROC
  xor eax,eax
  ret 
  hello ENDP
  
  END
  </code></pre>
  
  <p>and asm_test.cpp with main function like this:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;Windows.h&gt;
  extern "C" void hello();
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      hello();
      return 0;
  }
  </code></pre>
  
  <p>So in general ml.exe doesnt have any problem compiling asm file to hello.obj
  but hello() function doesnt' know where should it be taken from. And here is what compiler tells me.</p>
  
  <pre><code>1&gt;------ Построение начато: проект: asm_test, Конфигурация: Debug Win32 ------
  1&gt;  Assembling hello.asm...
  1&gt;asm_test.obj : error LNK2019: ссылка на неразрешенный внешний символ _hello в функции _wmain
  1&gt;G:\renderer\asm_test\Debug\asm_test.exe : fatal error LNK1120: неразрешенных внешних элементов: 1
  ========== Построение: успешно: 0, с ошибками: 1, без изменений: 0, пропущено: 0 ==========
  </code></pre>
  
  <p>Sorry, it's on russion, but it's clear that it can not find hello function</p>