在共享库中我试图编译有一个原型
extern int main(int argc, char *argv[]);
以及WinMain
函数的实现:
int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){
global_hinstance = hInstance;
return main(__argc, __argv);
}
但是当我尝试编译它时,我遇到了一些错误:
undefined reference to `__mingw_winmain_nShowCmd'
undefined reference to `__mingw_winmain_lpCmdLine'
undefined reference to `__mingw_winmain_hInstance'
为什么弹出这些?