FortySix&2
n00b
- Joined
- Mar 29, 2004
- Messages
- 51
Ok for some old reason I cant get any of my new C++ projects to compile. This may be something stupid I'm am missing but i have gotten to frustrated to figure it out. Does anyone have the answer.
Code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int ncmdshow)
{
MessageBox(NULL,"Test", "Test" , MB_OK | MB_ICONEXCLAMATION);
return(0);
}
Error:
Compiling...
Cpp1.cpp
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Ok so it is a simple program and It wont link. Is there a setting I am missing or what?
Any input is appreciated.
Code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int ncmdshow)
{
MessageBox(NULL,"Test", "Test" , MB_OK | MB_ICONEXCLAMATION);
return(0);
}
Error:
Compiling...
Cpp1.cpp
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Ok so it is a simple program and It wont link. Is there a setting I am missing or what?
Any input is appreciated.