
-----------------------------------
Martin
Thu Jun 12, 2003 1:23 pm

Windows
-----------------------------------
Here's my code:
#include 

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
    LPSTR lpCmdLine, int nCmdShow)
{
    MessageBox(NULL, "Testing 123...", "TEST", MB_OK);
    return 0;
}

It crashes, giving me two errors:
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals

Anyone know why? BTW, I'm using MS Visual c++ 6.0

-----------------------------------
Catalyst
Thu Jun 12, 2003 2:26 pm


-----------------------------------
works fine for me
using dev c++

-----------------------------------
Tony
Thu Jun 12, 2003 5:02 pm


-----------------------------------
following code works for VC++

#include 
#include 
using namespace std;

void main()
{ 
    MessageBox(NULL, "Testing 123...", "TEST", MB_OK); 

}

-----------------------------------
Martin
Thu Jun 12, 2003 5:48 pm


-----------------------------------
Yeah, I know, but that's still a console app. I just got Dev C++...I actually like it better.

-----------------------------------
Prince
Thu Jun 12, 2003 5:49 pm


-----------------------------------
yea this works for me too... which is strange considering nuthin else has :?
