/** converts 'WinMain' to the traditional 'main' entrypoint **/
#define PRO_MAIN(argc, argv)\
int __main (int, LPWSTR*, HINSTANCE, int);\
int WINAPI WinMain (HINSTANCE __hInstance, HINSTANCE __hPrevInstance, \
LPSTR __szCmdLine, int __nCmdShow)\
{\
int nArgs;\
LPWSTR* szArgvW = CommandLineToArgvW (GetCommandLineW(), &nArgs);\
assert (szArgvW != NULL);\
return __main (nArgs, szArgvW, __hInstance, __nCmdShow);\
}\
\
int __main (int __argc, LPWSTR* __argv, HINSTANCE __hInstance, int __nCmdShow)
现在,当我在这里使用此代码时:
PRO_MAIN(argc, argv)
{
...
}
我得到错误:
error: conflicting types for '__main'
note: previous declaration of '__main' was here
有什么问题?