[Libwebsockets] /usr/local/include/libwebsockets.h:487:8: error: forward declaration of ‘struct libwebsocket’

satya gowtham kudupudi satyagowtham.k at gmail.com
Mon Sep 29 18:39:35 CEST 2014


Thanks for the libwebsockets library and your help!

I'm using struct libwebsocket to get the socket its using libwebsocket::sock.
Here are the compiling commands that are producing the error.

g++    -c -g -D_DEBUG -I. -I/usr/local/include -I/usr/include/ferryfair
-std=c++11 -MMD -MP -MF "build/Debug/GNU-Linux-x86/WSServer.o.d" -o
build/Debug/GNU-Linux-x86/WSServer.o WSServer.cpp
In file included from FerryStream.h:18:0,
                 from WSServer.cpp:47:
WSServer.cpp: In static member function ‘static int
WSServer::callbackFairPlayWS(libwebsocket_context*, libwebsocket*,
libwebsocket_callback_reasons, void*, void*, size_t)’:
WSServer.cpp:465:83: error: invalid use of incomplete type ‘struct
libwebsocket’
             ffl_notice(FPL_WSSERV, "viewer %s:%d connected",
Socket::getIpAddr(wsi->sock).c_str(), Socket::getPort(wsi->sock));

       ^
/usr/include/ferryfair/base/logger.h:41:72: note: in definition of macro
‘ffl_notice’
 #define ffl_notice(level,...) _ff_log(__FUNCTION__, FFL_NOTICE, level,
__VA_ARGS__)
                                                                        ^
In file included from WSServer.h:16:0,
                 from WSServer.cpp:49:
*/usr/local/include/libwebsockets.h:487:8: error: forward declaration of
‘struct libwebsocket’*
 struct libwebsocket;
        ^
In file included from FerryStream.h:18:0,
                 from WSServer.cpp:47:
WSServer.cpp:465:119: error: invalid use of incomplete type ‘struct
libwebsocket’
             ffl_notice(FPL_WSSERV, "viewer %s:%d connected",
Socket::getIpAddr(wsi->sock).c_str(), Socket::getPort(wsi->sock));

                                           ^
/usr/include/ferryfair/base/logger.h:41:72: note: in definition of macro
‘ffl_notice’
 #define ffl_notice(level,...) _ff_log(__FUNCTION__, FFL_NOTICE, level,
__VA_ARGS__)
                                                                        ^
In file included from WSServer.h:16:0,
                 from WSServer.cpp:49:
/usr/local/include/libwebsockets.h:487:8: error: forward declaration of
‘struct libwebsocket’

--
Gowtham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20140929/5eb8e898/attachment-0001.html>


More information about the Libwebsockets mailing list