[Libwebsockets] compilation problem in libwebsocket

Andy Green andy at warmcat.com
Sat Aug 2 14:43:09 CEST 2014



On 2 August 2014 20:01:35 GMT+08:00, Priyaranjan Nayak <priyaranjan4169 at gmail.com> wrote:
>Hi All,
>
>I wanted to build liwebsocket source code by using codelite IDE . while
>building ,I am getting below compilation error.
>
>
>gcc -c  "/usr/local/src/priyaranjan/websocket/context.c" -g  -o
>./Debug/context.o -I. -I.
>gcc -c  "/usr/local/src/priyaranjan/websocket/daemonize.c" -g  -o
>./Debug/daemonize.o -I. -I.
>gcc -c  "/usr/local/src/priyaranjan/websocket/extension.c" -g  -o
>./Debug/extension.o -I. -I.
>gcc -c 
>"/usr/local/src/priyaranjan/websocket/extension-deflate-frame.c"
>-g  -o ./Debug/extension-deflate-frame.o -I. -I.
>gcc -c 
>"/usr/local/src/priyaranjan/websocket/extension-deflate-stream.c"
>-g  -o ./Debug/extension-deflate-stream.o -I. -I.
>gcc -c  "/usr/local/src/priyaranjan/websocket/getifaddrs.c" -g  -o
>./Debug/getifaddrs.o -I. -I.
>gcc -c  "/usr/local/src/priyaranjan/websocket/handshake.c" -g  -o
>./Debug/handshake.o -I. -I.
>gcc -c  "/usr/local/src/priyaranjan/websocket/libev.c" -g  -o
>./Debug/libev.o -I. -I.
>gcc -c  "/usr/local/src/priyaranjan/websocket/libwebsockets.c" -g  -o
>./Debug/libwebsockets.o -I. -I.
>gcc -c  "/usr/local/src/priyaranjan/websocket/lws-plat-unix.c" -g  -o
>./Debug/lws-plat-unix.o -I. -I.
>/usr/local/src/priyaranjan/websocket/libev.c:25:6: error: expected ‘)’
>before string constant
>/usr/local/src/priyaranjan/websocket/libev.c:33:65: warning: ‘struct
>ev_io’
>declared inside parameter list [enabled by default]
>/usr/local/src/priyaranjan/websocket/libev.c:33:65: warning: ‘struct
>ev_loop’ declared inside parameter list [enabled by default]
>/usr/local/src/priyaranjan/websocket/libev.c: In function
>‘libwebsocket_accept_cb’:
>/usr/local/src/priyaranjan/websocket/libev.c:37:78: error:
>dereferencing
>pointer to incomplete type
>/usr/local/src/priyaranjan/websocket/libev.c:39:16: error: ‘EV_ERROR’
>undeclared (first use in this function)

Did you use cmake with LWS_WITH_LIBEV?  If so delete and recreate your build dir an re-run cmake without that.  Or install libev-dev or whatever your system needs.

-Andy

>/usr/local/src/priyaranjan/websocket/libev.c:39:16: note: each
>undeclared
>identifier is reported only once for each function it appears in
>/usr/local/src/priyaranjan/websocket/libev.c:42:22: error:
>dereferencing
>pointer to incomplete type
>/usr/local/src/priyaranjan/websocket/libev.c:43:20: error: ‘EV_NONE’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:44:16: error: ‘EV_READ’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:47:16: error: ‘EV_WRITE’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c: At top level:
>/usr/local/src/priyaranjan/websocket/libev.c:55:17: warning: ‘struct
>ev_signal’ declared inside parameter list [enabled by default]
>/usr/local/src/priyaranjan/websocket/libev.c:55:17: warning: ‘struct
>ev_loop’ declared inside parameter list [enabled by default]
>/usr/local/src/priyaranjan/websocket/libev.c: In function
>‘libwebsocket_sigint_cb’:
>/usr/local/src/priyaranjan/websocket/libev.c:57:17: error:
>‘EVBREAK_ALL’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c: At top level:
>/usr/local/src/priyaranjan/websocket/libev.c:63:9: warning: ‘struct
>ev_loop’ declared inside parameter list [enabled by default]
>/usr/local/src/priyaranjan/websocket/libev.c: In function
>‘libwebsocket_initloop’:
>/usr/local/src/priyaranjan/websocket/libev.c:68:28: error: ‘ev_io’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:68:35: error: expected
>expression before ‘)’ token
>/usr/local/src/priyaranjan/websocket/libev.c:69:32: error: ‘ev_signal’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:69:43: error: expected
>expression before ‘)’ token
>/usr/local/src/priyaranjan/websocket/libev.c:72:8: warning: assignment
>makes pointer from integer without a cast [enabled by default]
>/usr/local/src/priyaranjan/websocket/libev.c:74:9: error: ‘struct
>libwebsocket_context’ has no member named ‘io_loop’
>/usr/local/src/priyaranjan/websocket/libev.c:81:34: error: ‘EV_READ’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:82:21: error: ‘struct
>libwebsocket_context’ has no member named ‘io_loop’
>/usr/local/src/priyaranjan/websocket/libev.c:84:25: error: ‘struct
>libwebsocket_context’ has no member named ‘io_loop’
>/usr/local/src/priyaranjan/websocket/libev.c:88:7: error:
>‘EVBACKEND_SELECT’ undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:91:7: error:
>‘EVBACKEND_POLL’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:94:7: error:
>‘EVBACKEND_EPOLL’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:97:7: error:
>‘EVBACKEND_KQUEUE’ undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:100:7: error:
>‘EVBACKEND_DEVPOLL’ undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c:103:7: error:
>‘EVBACKEND_PORT’
>undeclared (first use in this function)
>/usr/local/src/priyaranjan/websocket/libev.c: At top level:
>/usr/local/src/priyaranjan/websocket/libev.c:117:1: error: expected
>identifier or ‘(’ before ‘void’
>/usr/local/src/priyaranjan/websocket/libev.c:117:1: error: expected ‘)’
>before numeric constant
>/usr/local/src/priyaranjan/websocket/libev.c:133:1: error: expected
>identifier or ‘(’ before ‘void’
>/usr/local/src/priyaranjan/websocket/libev.c:133:1: error: expected ‘)’
>before numeric constant
>/usr/local/src/priyaranjan/websocket/libev.c:159:1: error: expected
>identifier or ‘(’ before numeric constant
>/usr/local/src/priyaranjan/websocket/libev.c:171:1: error: expected
>identifier or ‘(’ before ‘void’
>/usr/local/src/priyaranjan/websocket/libev.c:171:1: error: expected ‘)’
>before numeric constant
>make[1]: *** [Debug/libev.o] Error 1
>make[1]: *** Waiting for unfinished jobs....
>
>Cloud you please tell me the procedure to build in codelites .
>
>Thanks
>Priyaranjan
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list