Cross-compiling libcurl,openssl,zlib with MinGW

Source: Internet
Author: User

Cross-compiling libcurl,openssl,zlib with MinGW

Extract three libraries into the same directory, such as the directory named "source" pre-installation Active-perl configuration MinGW and Msys environment otherwise compile error-source+ curl-xxx+ openssl-1.0.xx+ zlib-xxx1 first step (performed in Msys environment)compile OpenSSL to enter four instructions sequentially./config-t./config Threads Shared No-capiengMake depend Make will generate LIBCRYPTO.A LIBSSL.A LIBSSL.DLL.A LIBCRYPTO.DLL.A These four files and the corresponding DLL files,However, no DLL files are required during compilation, and the first two of the above four *.a files are not required, and two folders "out" and "Outinc" are created in the OpenSSL directory .Copy the Libssl.dll.a LIBCRYPTO.DLL.A to the Out folder and rename it to "libssl32.a" "libeay32.a"Copy the OpenSSL folder in the Include folder under OpenSSL into the Outinc .2 second step (performed in Msys)compiling zlibInput InstructionsCP WIN32/MAKEFILE.GCC MAKEFILE.GCCmingw32-make-f MAKEFILE.GCC3 Step Three (modify the compilation configuration file, that is, I want to cross-compile the path of the specified other library)into the Lib folder curl to find makefile.m32 with notepad++ Open, of course, with other open also line, but not recommended Windows bring Notepad Find Openssl_path =. /.. /openssl-xxxxxxxZlib_path =.. /.. /zlib-xxxxxxxModify the folder name to your actuallike mine.Openssl_path =.. /.. /openssl-1.0.0gZlib_path =.. /.. /zlib-1.2.54. Fourth step (in Msys environment)cross-compiling LibcurlMingw32-make Mingw32-ssl-zlibGenerate LIBCURL.A libcurldll.a Libcurl.dll Delete the LIBCURL.A (I don't think I need to), replace it with LIBCURLDLL.A, rename it to LIBCURL.A 5. Organize the Openssl/out file in the *.A The fourth step of the *.a file is taken out. The *.a file in the zlib is removed and placed in a Lib folder (self-built) Libz.dll Libeay.dll Libssl.dll Libcurl.dll taken out to the bin directory, built Remove the OpenSSL header file, Libcurl header file, and put it in the include (build it yourself, zlib seems to have it too) http://bhlzlx.blog.51cto.com/3389283/935370

Cross-compiling libcurl,openssl,zlib with MinGW

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.