在vc6.0下调试的错误。
Linking...
testapp.obj : error LNK2001: unresolved external symbol _PacketCloseAdapter
testapp.obj : error LNK2001: unresolved external symbol _PacketFreePacket
testapp.obj : error LNK2001: unresolved external symbol _PacketGetStats
testapp.obj : error LNK2001: unresolved external symbol _PacketReceivePacket
testapp.obj : error LNK2001: unresolved external symbol _kbhit
testapp.obj : error LNK2001: unresolved external symbol _PacketInitPacket
testapp.obj : error LNK2001: unresolved external symbol _PacketAllocatePacket
testapp.obj : error LNK2001: unresolved external symbol _PacketSetReadTimeout
testapp.obj : error LNK2001: unresolved external symbol _PacketSetBuff
testapp.obj : error LNK2001: unresolved external symbol _PacketSetHwFilter
testapp.obj : error LNK2001: unresolved external symbol _PacketOpenAdapter
testapp.obj : error LNK2001: unresolved external symbol _scanf
testapp.obj : error LNK2001: unresolved external symbol _wprintf
testapp.obj : error LNK2001: unresolved external symbol _memcpy
testapp.obj : error LNK2001: unresolved external symbol _PacketGetAdapterNames
testapp.obj : error LNK2001: unresolved external symbol _printf
testapp.obj : error LNK2001: unresolved external symbol _PacketGetVersion
testapp.obj : error LNK2001: unresolved external symbol __chkstk
testapp.obj : error LNK2001: unresolved external symbol __chkesp
testapp.obj : error LNK2001: unresolved external symbol _isprint
LINK : error LNK2001: unresolved external symbol _mainCRTStartup在程序中已经加入了
#pragma comment(lib,"packet.lib")
#pragma comment(lib,"wpcap.lib")在Tools->Options->directories中也已经加入了winpcap开发包中的.h文件和.lib文件的路径,并且置为了顶层。请问高手们,这些错误该怎么改?

解决方案 »

  1.   

    连VC的标准库path都没有了。
    memcpy, scanf都不能链接到。
    C:\Program Files\Microsoft Visual Studio\VC98\LIB
    C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB改成你实际的安装path.
      

  2.   

    你直接将LIB和include文件拷贝到vc安装环境的lib和include目录下。再试一下。实在不行,不是项目的话,可以拿来我帮你调试。这个我还是比较熟悉
      

  3.   

    你到VC工作路径下执行初始化PATH,是一个vc*.BAT,现在手上电脑纯系统,没环境,不记得了
      

  4.   

    If your program uses Win32 specific functions of WinPcap, remember to include WPCAP among the preprocessor definitions. 
    If your program uses the remote capture capabilities of WinPcap, add HAVE_REMOTE among the preprocessor definitions. Do not include remote-ext.h directly in your source files.在预处理中加入 WPCAP, HAVE_REMOTE 
      

  5.   

    link中间加入lib支持了吗
    Packet.lib和wpcap.lib