--------------------Configuration: H263PLAY - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/H263PLAY.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.H263PLAY.exe - 2 error(s), 0 warning(s)
WIN32,_DEBUG,_WINDOWS,_MBCS

解决方案 »

  1.   

    project->Settings...
    link tab
    Project Options
     /subsystem:console change to  /subsystem:windows
      

  2.   

    main()->必须使用控制台方式编译
    否则就将main改为WinMain(按照你上面的设置)。
      

  3.   

    MSDN如下解释:PRB: Link Error LNK2001: Unresolved External Symbol _main Q291952--------------------------------------------------------------------------------
    The information in this article applies to:Microsoft Visual Studio 6.0 
    Microsoft Visual C++, 32-bit Professional Edition, version 6.0 
    Microsoft Visual Basic Enterprise Edition for Windows, version 6.0--------------------------------------------------------------------------------
    SYMPTOMS
    When you build a project of one of these types Win32 console application project
    Active Template Library (ATL) DLL/EXE project with release configuration
    A project with main as custom entry point
    you may get the following error message from linker: 
    LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main CAUSE
    A Win32 console application requires the main function as the entry point. Linker returns this error message when it cannot find the main function in any of the files attached to the project.If your project is an ATL project, the release configurations for ATL projects define _ATL_MIN_CRT, which excludes CRT (C runtime) startup code from your .exe or .dll file. Linker gives this error message when you have _ATL_MIN_CRT defined and you are using the CRT functions that need CRT startup code.If the project is not one of the types listed in the "Symptoms" section of this article, but you are still getting the error, you might have main selected as an entry point symbol for the project in linker settings but have not provided a main function in the files added to the project. RESOLUTIONIf you have created a Win32 console application instead of a Win32 application by mistake, there are two ways to fix this problem:
    From the Project menu, choose Settings, click the C/C++ tab, and change preprocessor definitions from WIN32, _DEBUG, _CONSOLE, and _MBCS to WIN32, _DEBUG, and _WINDOWS. Next, click the Link tab, and under Project Options, change /subsystem:console to /subsystem:windows. -or-
    Create a new project and select Win32 Application instead of Win32 Console Application. Add the files to that project.
    If you have created a Win32 console application and forgot to provide a main function, write a main function in one of the source files added to the project.
    If you have selected main as the custom entry point by mistake, from the Project menu, choose Settings and click the Linker tab. Select output as the category and remove main from the entry-point symbol text box.
    If your project is an ATL project, there are two ways to fix the problem:
    Remove _ATL_MIN_CRT from the list of preprocessor definitions to allow CRT startup code to be included: From the Build menu, choose Settings. Hold down the CTRL key while selecting all of the release configurations. On the C/C++ tab, choose the General category, and then remove _ATL_MIN_CRT from the preprocessor definitions edit box.-or-If possible, remove calls to CRT functions that require CRT startup code and use their Win32 equivalents. For example, use lstrcmp instead of strcmp. Known functions that require CRT startup code include the string and floating point functions. STATUS
    This behavior is by design.