I'm trying to start out using Microsoft Visual C++ 2005 Express Edition Beta (Really long title), and so I tried making a "Hello world" of sorts for the windows API:
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
MessageBox(NULL, "Hello!", "Hello!", MB_OK);
}
When I build my "solution", I get the following error:
------ Build started: Project: Test, Configuration: Debug Win32 ------
Linking...
Main.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function _WinMain@16
Debug/Test.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Administrator\Desktop\Base\Code\2005\Test\Test\Debug\BuildLog.htm"
Test - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Whats wrong?