LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

前端 未结 12 2040
广开言路
广开言路 2020-12-02 18:36

I have the following error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup,

There are a lot of threads relating to this error bu

12条回答
  •  生来不讨喜
    2020-12-02 19:11

    I got this error while I was trying to turn off precompiled headers in a Console Application Project and removing the header file stdafx.h

    To fix this go to your project properties -> Linker -> SubSystem and change the value to Not Set

    In your main class, use the standard C++ main function protoype that others have already mentioned :

    int main(int argc, char** argv)
    

提交回复
热议问题