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