MinGW compiling Libwebsockets

Source: Internet
Author: User

Libwebsockets is a lightweight, pure C library, where you try to build with MinGW.

Website address: http://libwebsockets.org/trac/libwebsockets
: http://git.warmcat.com/cgi-bin/cgit/libwebsockets/snapshot/libwebsockets-1.22-chrome26-firefox18.tar.gz

First, build MSYS2 environment, see the article "MSYS2 Environment Building", before compiling must have autoconf, Automake, Libtool, make tools, use command pacman-s command to install, and then CD to the library directory, using the following command:

1
2
3
4
./autogen.sh
./configure--prefix=/mingw32--enable-mingw--without-daemonize--without-testapps
Make
Make install

Where the parameter--without-daemonize--without-testapps is due to MinGW32 compilation under Windows, but no correlation definition is found. (FIXME)

Once you're done, you can generate the Libwebsockets.a file.

Next, under the "E:\msys32\mingw32\include" directory, create a new win32helpers folder, and copy "libwebsockets-1.22-chrome26-firefox18\ Win32port\win32helpers "folder under the Websock-w32.h file to this folder.
To edit the E:\msys32\mingw32\include\libwebsockets.h file, change the following two lines:

1
2
3
#include "Win32helpers/websock-w32.h"

#include "Win32helpers/gettimeofday.h"

Complete.

http://blog.csdn.net/akof1314/article/details/18183911

MinGW compiling Libwebsockets

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.