Under Windows compilation configuration LIBNET-1.2-RC3

Source: Internet
Author: User

Official website: http://packetfactory.openwall.net/projects/libnet/

Download (with two versions of Zip and tar.gz): https://github.com/sam-github/libnet/releases

After decompression:

Compile steps:

    1. Copy the LIBNET-LIBNET-1.2-RC3 to the D drive
    2. Double-click the Msvcbuild.bat file in the Libnet directory and then generate Libnet.dll and libnet.lib in the SRC directory

--------------------------------------------------------------------------------------------------------------- --

(Note: If you double-click Compile, you will need to configure vs in the VC compiler related directories as described in the libnet0.10.11 compiled in Windows.) Or go directly from VS2013 's command line console.

Libnet directory Execution Msvcbuild.bat), the command line for VS2013 is recommended in the Package Manager console, tool-and library Package Manager, the latter

CD d:cd. \libnet-libnet-1.2-rc3\libnetmsvcbuild.bat

There was a heap of warning during the compilation, but finally the compilation was successful.

--------------------------------------------------------------------------------------------------------------- ---

For a detailed compilation process see: Http://www.verydemo.com/demo_c173_i160089.html

Some of the errors that occurred are described. It also extracts it to the end of the article ~

Set up the directory on the D disk:

Libnet-1.2-r3-build/bin

Libnet-1.2-r3-build/include

Libnet-1.2-r3-build/lib

Copy the Libnet.dll and Libnet.lib in Libnet-libnet-1.2-rc3/libnet/src to the bin and Lib directories, respectively,

Copy the Libnet-libnet-1.2-rc3/libnet/include directory to Libnet-1.2-r3-build/include

Added in the System environment variable path: Libnet-1.2-r3-build/bin

Configure include and Lib in the VC + + directory in VS, add libnet.lib to the link input

(Note: After modifying the environment variable to restart vs to take effect on VS)

This is the end of the Libnet development configuration ~

---------------------------------------------------------------------------------

From:http://www.verydemo.com/demo_c173_i160089.html

Libnet compilation, Windows/linux

Windows under

1. Download the installation package Libnet-libnet-1.2-rc2.zip

Https://github.com/sam-github/libnet/releases

2. Unzip to the D:\LIBNET-LIBNET-1.2-RC2 directory
3. Download Winpcap_4_1_2.zip and wpdpack_4_1_2.zip
    Installing Winpcap_4_1_2
Unzip Wpdpack_4_1_2.zip extract to D:\WpdPack

4. Compiling

3.1 Open command Prompt for Visual Studio Tools, vs. Visual Studio, (2010)

3.2 Switch to directory D:\libnet-libnet-1.2-rc2\libnet

3.3 Executive Msvcbuild.bat

3.4 Other

A. You are not prompted for "Pcap.h".

Modify the "@set winpcap= in Msvcbuild.bat. \.. \.. \wpdpack "for" @set Winpcap=d:\wpdpack "

B. LIBNET_DLL.C (+): Fatal error C1083: Cannot open include file: "Common": no such file or directory

Change the #include "common" of 32 rows in libnet_dll.c to #include "common.h".

C. LIBNET_RAW.C: Error C2054: After "socklen_t" You should enter "("
LIBNET_RAW.C: Error C2082: redefinition of formal parameter "LIBNET_OPEN_RAW4"
LIBNET_RAW.C: Error C2143: Syntax errors: Missing ";" (in front of "{")

Comment out the contents of the 35~37 line in LIBNET_RAW.C:

#ifndef have_socklen_t
typedef int SOCKLEN_T
#endif

Will libnet_raw.c in 70 rows of socklen_t Len; change to int len;.

5. Generate results

Generate Libnet.lib, Libnet.dll under directory D:\libnet-libnet-1.2-rc2\libnet\src.

----------------------- Linux under

1. Download the installation package libnet-1.2-rc2.tar.gz

http://sourceforge.net/projects/libnet-dev/
2. Unzip the libnet-1.2-rc2.tar.gz
Tar zxvf libnet-1.2-rc2.tar.gz 3. compiling
3.1./configure 3.2 make 3.3 make install
4. Generate Results
Generate LIBNET.A, libnet.so in the libnet-1.2-rc2/src/.libs/directory.

Under Windows compilation configuration LIBNET-1.2-RC3

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.