dfrunza
'user32.lib' needs to be passed to the linker using the '/link' option :
That's not necessary. lib files passed to cl.exe will get automatically passed to link.exe even without "/link" argument.
@catsonmars: are you sure you are editing and calling same .bat file? Can you show full output from running .bat file (copy&paste it in [ code ] bbtags)
And are using same cl.exe as your IDE uses? Basically are you calling vcvarsall.bat from same folder as your IDE?