我编一个socket类,编译通过,但无法通过Link。
error LNK2001: unresolved external symbol __endthreadex
error LNK2001: unresolved external symbol __beginthreadex
Debug/CNet.exe : fatal error LNK1120: 2 unresolved externals
这是缺少什么文件?请各位指点

解决方案 »

  1.   

    #include <process.h>    /* _beginthread, _endthread */
    /* illustrates multiple threads using functions:
     *
     *      _beginthread            _endthread
     *
     *
     * This program requires the multithreaded library. For example,
     * compile with the following command line:
     *     CL /MT /D "_X86_" BEGTHRD.C
     *
     * If you are using the Visual C++ development environment, select the 
     * Multi-Threaded runtime library in the compiler Project Options dialog 
     * box.
     * 
     */
      

  2.   

    你的程序存在两个问题:
    首先你的应该这样设置:
    Project--->Settings----->C ++ ------>Category:Code Generation---->using runtime library:debug multithread其次你应该建的是 win32 console application应用程序才
    project->Settings...
    link tab
    Project Options
     /subsystem:windows change to  /subsystem:console