title: Using printf in assembly 86, visual studio
body: <p>I wrote a simple program to use printf function in my code, but visual studio gives me the following error.</p>
  
  <pre><code>error LNK1120: 1 unresolved externals
  error LNK2001: unresolved external symbol _printf
  </code></pre>
  
  <p>Here's the source code :</p>
  
  <pre><code>.586
  .model  flat,stdcall
  .stack 4096
  
  extern  ExitProcess@4   :   proc
  extern  _printf         :   proc
  
  .data
  msg     BYTE    "Hello world",0
  
  .code
  main:
  
  lea     eax,msg
  push    eax
  call    _printf
  
  push    0                           ; return to os contorl point
  call    ExitProcess@4
  
  end main
  </code></pre>