MinGW and Libcurl

Source: Internet
Author: User

Want to use curl to do the rest of the client. So I studied this stuff.

1: Install MinGW

Why use MinGW, small, must vs fast, gcc know more,

Http://tdm-gcc.tdragon.net/download, here according to different platforms to choose a different version, I downloaded the Tdm64-gcc-4.9.2-3.exe

2: Compiling Libcurl

Download the Curl source file, unzip and enter the Curl-7.41.0\lib directory to execute mingw32-make-f makefile.m32; after execution, the LIBCURL.A file will be generated under LIB.

3: Prepare a curl example file to compile.

d:\dev>g++-id:/dev/curl/include/curl-ld:/dev/curl/lib main.c-lcurl-lwldap32-lws2_32-dcurl_staticlib

This piece is important:

wLDAP,ws2_32 This even a must add, one is LADP library, one is the network library.

-dcurl_staticlib a static library that uses Curl is LIBCURL.A

MinGW is very useful.

MinGW and Libcurl

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.