The No. 0 Chapter: Preparation Environment

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/fuxingdaima/article/details/8820009

SOURCE Download unpv13e.tar.gz

If you are downloading version unpv12e.tar.gz, you will encounter a lot of trouble at compile time.

$ tar xzvf unpv13e.tar.gz

$ CD unpv13e

The compilation process, and the problems encountered. You can view the compilation steps by viewing the Readme file

(1) Compile the library

$./configure

$ cd Lib

$ make

$ CD. /libfree

$ make

Error: inet_ntop.c:61:error:argument ' size ' doesn ' t match prototype

Workaround: Enter the document and change 61 lines to socklen_t size;

(2) Compiling client programs and server-side programs

$ CD. /intro

$ make

(3) Run the test

$ ./daytimetcpsvr&//background running server

$./DAYTIMETCPCLI//Run the client, the following date output indicates that the compilation and Test succeeded

(4) with the environment in order to test the self-written program

$ CD. Back to the unpv13e directory

$ CP Libunp.a/usr/lib

$ CP libunp.a/usr/lib64

$ CP lib/unp.h.

$ VI unp.h//Put just a copy of the Unp.h file in the # include ". /config.h "changed to #include" Config.h "

$ CP unp.h Config.h/usr/include

Since then, you can directly include<unp.h> in the code you have written, and with the option-LUNP at compile time you can link libunp.a.

The No. 0 Chapter: Preparation Environment

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.