You can include the missing library using #pragma, but it is usually best to include it in the linker options of the project options.
#include <stdio.h>
#include <stdlib.h>
#if defined(_WIN32) || defined (_WIN64)
#include <windows.h>
#define WINDOWSS 1
#pragma comment(lib, "user32.lib")
#endif
#ifdef WINDOWSS
int main()
{
char* mtext = " hi Billy !! )) WE'RE IN WINDOWS NOW !))\n build as win32 CONSOLE program \n" ;
printf("\n%s",mtext );
return TRUE;
MessageBox(NULL,"Compiled as WIN32 program (not win 32 console program) (you'll need special functions to get console window)) !","Test",MB_OK);
}
#else
int main()
{
char* mtext = " Glory to the great hacker, Linus Torvalds! we're not in Windows!\n" ;
printf("\n%s",mtext );
return TRUE;
}
#endif
2011-10-15 Edit: corrected lib pragma