Hi,
I dont really know if this is the correct place to be posting this but i have a ver simple problem. I have a very simple hello world win32 application.
This is the code:
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int iCmdShow)
{
MessageBox(NULL, "Hello, world!", "Example", 0);
return 0;
}
The code compiles and runs in Dev C++ but fails in microsoft visual C++ with two errors.
error LNK2005: _WinMain@16 already defined in hello.obj
fatal error LNK1169: one or multiply defined symbols found
Before these two errors i was getting a error about precompiled headers but i turned them off.
Any insight would be appreciated.
Thanks
I dont really know if this is the correct place to be posting this but i have a ver simple problem. I have a very simple hello world win32 application.
This is the code:
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int iCmdShow)
{
MessageBox(NULL, "Hello, world!", "Example", 0);
return 0;
}
The code compiles and runs in Dev C++ but fails in microsoft visual C++ with two errors.
error LNK2005: _WinMain@16 already defined in hello.obj
fatal error LNK1169: one or multiply defined symbols found
Before these two errors i was getting a error about precompiled headers but i turned them off.
Any insight would be appreciated.
Thanks