title: Link error for masm. LNK2001: unresolved external symbol. Assembly language
body: <p>I successfully assembled the following code buy I cannot link it.  </p>
  
  <pre><code> TITLE Add and Subtract
  
  ;This program adds and subtracts 32-bit integers
  
  INCLUDE Irvine32.inc
  
  .code
  main PROC 
  
  mov eax,10000h
  add eax,40000h
  sub eax,20000h
  call DumpRegs
  
  exit
  main ENDP
  END main
  </code></pre>
  
  <p>I'm using the following command to link it.  </p>
  
  <p>link addsub.obj irvine32.lib kernel32.lib /SUBSYSTEM:CONSOLE /DEBUG</p>
  
  <p>I'm getting the followng error.  </p>
  
  <p>irvine32.lib : error LNK2001: unresolved external symbol _MessageBoxA@16
  addsub.exe : fatal error LNK1120: 1 unresolved externals</p>
  
  <p>I do not know where to find this MessageBox and link it to the program.  Any help?</p>
  
  <p>edit:</p>
  
  <p>So I linked User32.lib into the file with the following command. </p>
  
  <p>link addsub.obj irvine32.lib kernel32.lib user32.lib /SUBSYSTEM:CONSOLE /DEBUG </p>
  
  <p>and got the following error. </p>
  
  <p>LINK: fatal error LNK1000: unknown error consult documentation for technical support options. </p>
  
  <p>What am I supposed to do with that?</p>