winpcap里面VS编程错误总结
2012-09-06 11:02
141 查看
To create an application that uses wpcap.dll with Microsoft Visual C++, follow these steps:
创建一个应用程序需要用到wpcap.dll的需要按照下面的步骤:
Include the file pcap.h at the beginning of every source file that uses the functions exported by library. 包含“pcap.h”
If your program uses Win32 specific functions of WinPcap, remember to include WPCAP among the preprocessor definitions. 如果你的程序用到Win32的特定函数,那么就要记住包含wpcap在预编译之前。
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.
如果你的程序用到远程抓包能力的winpcap函数,那么就要添加HAVE_REMOTE在预编译之前。
Set the options of the linker to include the wpcap.lib library file. wpcap.lib can be found in the WinPcap developer's pack.
设置链接器的选项,包含wpcap.lib的库文件,它可以被发现在WinPcap的开发包里面。
Set the options of the linker to include the winsock library file ws2_32.lib. This file is distributed with the C compiler and contains the socket functions for Windows. It is needed by some functions used by the samples in the tutorial.
设置链接器的选项,包含winsock的库文件ws2_32.lib,这个文件是由c编译器发布的,包含wins的socket函数。
Remember that:
To add a preprocessor definition, you must select Settings from the Project menu, then select C/C++ from the tab control, and under the category General, you must add the definition under the Preprocessor Definitions text box.
To add a new library to the project with Microsoft Visual C++ 6.0, you must select Settings from the Project menu, then select Link from the tab control, and then add the name of the new library in the Object/library modules edit box.
To add a new path where Microsoft Visual C++ 6.0 will look for the libraries, you must select Options from the Tools menu, then Directories from the tab control, Library files from the Show directories for combo box, and the add the path in the Directories
box.
To add a new path where Microsoft Visual C++ 6.0 will look for include files, you must select Options from the Tools menu, then Directories from the tab control, Include files from the Show directories for combo box, and the add the path in the Directories
box.
创建一个应用程序需要用到wpcap.dll的需要按照下面的步骤:
Include the file pcap.h at the beginning of every source file that uses the functions exported by library. 包含“pcap.h”
If your program uses Win32 specific functions of WinPcap, remember to include WPCAP among the preprocessor definitions. 如果你的程序用到Win32的特定函数,那么就要记住包含wpcap在预编译之前。
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.
如果你的程序用到远程抓包能力的winpcap函数,那么就要添加HAVE_REMOTE在预编译之前。
Set the options of the linker to include the wpcap.lib library file. wpcap.lib can be found in the WinPcap developer's pack.
设置链接器的选项,包含wpcap.lib的库文件,它可以被发现在WinPcap的开发包里面。
Set the options of the linker to include the winsock library file ws2_32.lib. This file is distributed with the C compiler and contains the socket functions for Windows. It is needed by some functions used by the samples in the tutorial.
设置链接器的选项,包含winsock的库文件ws2_32.lib,这个文件是由c编译器发布的,包含wins的socket函数。
Remember that:
To add a preprocessor definition, you must select Settings from the Project menu, then select C/C++ from the tab control, and under the category General, you must add the definition under the Preprocessor Definitions text box.
To add a new library to the project with Microsoft Visual C++ 6.0, you must select Settings from the Project menu, then select Link from the tab control, and then add the name of the new library in the Object/library modules edit box.
To add a new path where Microsoft Visual C++ 6.0 will look for the libraries, you must select Options from the Tools menu, then Directories from the tab control, Library files from the Show directories for combo box, and the add the path in the Directories
box.
To add a new path where Microsoft Visual C++ 6.0 will look for include files, you must select Options from the Tools menu, then Directories from the tab control, Include files from the Show directories for combo box, and the add the path in the Directories
box.
相关文章推荐
- vs2013编程错误总结
- Qt之网络编程错误总结
- 编程错误总结
- 由今天的错误引发对编程的思考总结
- vs 2005 与matalab混编出错解决: matrix.h里面出现错误
- 用QT编程时遇到的错误总结
- android开发常见编程错误总结
- 根据错误代码使用VS自带的errlook.exe查看错误信息及常见错误信息代码含义总结
- OpenCV和关于VS平台的一些编程总结
- VS编程常见的编译和链接错误
- VS里面遇到的很多错误,都是因为没有导入合适的库
- Opencl编程错误总结
- VS.NET调试 ASP.NET出现的常见错误总结
- VS.NET调试 ASP.NET出现的常见错误总结
- VS2015 程序运行调试错误总结
- 配置vs/vc的winpcap编程
- C++与opencv的一些编程和函数的使用错误总结
- VS2013 OpenGL 编程中常见的错误
- 编程基础知识——VS里面的各种字符串
- Android 调用js,传对象到js里面使用addJavascriptInterface错误总结