I want to know how to compile Win32 program using MS 32-bit C/C++ Compiler (cl.exe) of Visual Studio 2008 professional. But I got the LNK2019 error (unresulved external simbol__imp__MessageBoxA) when compiling the following code (Simple.c) with "cl Simple.c" command:
Remeber to run the appropriate vsvars.bat in your console before running cl. If you're doing this in Visual Studio, the include/lib paths, libraries and so on are already setup in the project by the wizard.
kbw's answer solved my problem as follows:
(1) launch Visual Studio 2008 Command Window;
(2) cl Simple.c user32.lib // Simple.c being my win32 program I originally posted at the top of this thread
Done