chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.38k stars 467 forks source link

'wWinMain': function cannot be overloaded #3811

Closed copilot0058 closed 1 month ago

copilot0058 commented 1 month ago

Describe the bug I try to build the cef project by myself and I just use this simply code to build. It show'wWinMain': function cannot be overloaded

To Reproduce

// Program entry point function.
int APIENTRY wWinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPTSTR lpCmdLine,
    int nCmdShow) {
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    return shared::RunMain(hInstance, nCmdShow);
}
magreenblatt commented 1 month ago

An executable target can only have one wWinMain implementation.

copilot0058 commented 1 month ago

Do you have the special technique to solve it? Because I just paste the similar code, like this https://github.com/chromiumembedded/cef/blob/6f44cfcb65e4b596a85ca08a4ffb7202e20682a6/tests/cefclient/cefclient_win.cc#L135-L141

https://github.com/chromiumembedded/cef/blob/6f44cfcb65e4b596a85ca08a4ffb7202e20682a6/tests/cefsimple/cefsimple_win.cc#L24-L30