Error LNK2019 unresolved external symbol _WinMain@16 referenced in function “int __cdecl invoke_main(void)” (?invoke_main@@YAHXZ)

后端 未结 4 835
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-14 07:30

This is my script i have no idea to solve this error Please help me Thank you so much

float angle = 15;
float x, y, z;               // for polygon rotate 

voi         


        
4条回答
  •  遇见更好的自我
    2021-02-14 08:20

    You've set the project to build as a Windows application, not a command line application. Change int main() to:

    int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCmdLine, int nCmdShow)

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms633559%28v=vs.85%29.aspx

    Or, change your project properties to be a command line application.

提交回复
热议问题