在VC++6下运行#inlcude<windows.h>
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance LPSTR lpCmdLine,   int nCmdShow) 为什么不能编译运行,出现的错误提示是:
 error LNK2001: unresolved external symbol "bool __cdecl InitInstance(void *,int)" (?InitInstance@@YA_NPAXH@Z)应该如何修改,使其运行,谢谢。

解决方案 »

  1.   

    你这个函数在CPP中有它的实现吗或者说有CPP吗?那是没找到实现部分
      

  2.   

    有呀,不过没有写出来。
    int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,   int nCmdShow)         
    {
    MSG msg;

    UNREFERENCED_PARAMETER(lpCmdLine); 
    if (!hPrevInstance)
    if (!InitApplication(hInstance))
    return (FALSE);

    if (!InitInstance(hInstance, nCmdShow))
    return (FALSE);

    while (GetMessage(&msg, NULL, 0, 0)) {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
    }

    return (msg.wParam); 
    }