[Libwebsockets] Compile error Windows, MSVC++ 2010

Chris Hanson xenon at alphapixel.com
Mon Dec 15 08:02:11 CET 2014


I'm encountering the error below trying to build WITH_SSL and not
WITH_LIBEV on VS2010, 32-bit, Windows.

It appears to be choking on the line

struct libwebsocket_context *context = wsi->protocol->owning_server;

basically saying that the libwebsocket_context type is not defined.

Which is bizarre, because it works higher up in the same file. I have found
that above line 77:

lws_libev_io(context, wsi, LWS_EV_STOP | LWS_EV_READ | LWS_EV_WRITE);

this line of code compiles fine.

I don't use libev, but it seems like the lws_libev_io call is not properly
being compiled out in the event that I lack libev.

  Is libev even available for Windows? Is there a way to get this to
compile properly?


1>------ Build started: Project: websockets, Configuration: Debug Win32
------
1>Build started 12/14/2014 11:55:48 PM.
1>ClCompile:
1>  pollfd.c
1>..\libwebsockets\lib\pollfd.c(136): error C2143: syntax error : missing
';' before 'type'
1>..\libwebsockets\lib\pollfd.c(137): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(139): error C2143: syntax error : missing
';' before 'type'
1>..\libwebsockets\lib\pollfd.c(140): error C2143: syntax error : missing
';' before 'type'
1>..\libwebsockets\lib\pollfd.c(141): error C2143: syntax error : missing
';' before 'type'
1>..\libwebsockets\lib\pollfd.c(142): error C2143: syntax error : missing
';' before 'type'
1>..\libwebsockets\lib\pollfd.c(144): error C2065: 'pfd' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(144): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(144): error C2223: left of '->fds' must
point to struct/union
1>..\libwebsockets\lib\pollfd.c(145): error C2065: 'pa' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(145): error C2224: left of '.fd' must have
struct/union type
1>..\libwebsockets\lib\pollfd.c(147): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(147): error C2223: left of '->protocols'
must point to struct/union
1>..\libwebsockets\lib\pollfd.c(147): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(148): error C2065: 'pa' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(150): error C2065: 'pa' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(150): error C2224: left of '.prev_events'
must have struct/union type
1>..\libwebsockets\lib\pollfd.c(150): error C2065: 'pfd' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(150): error C2223: left of '->events' must
point to struct/union
1>..\libwebsockets\lib\pollfd.c(151): error C2065: 'pa' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(151): error C2224: left of '.events' must
have struct/union type
1>..\libwebsockets\lib\pollfd.c(151): error C2065: 'pfd' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(151): error C2223: left of '->events' must
point to struct/union
1>..\libwebsockets\lib\pollfd.c(151): error C2065: 'pfd' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(151): error C2223: left of '->events' must
point to struct/union
1>..\libwebsockets\lib\pollfd.c(153): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(153): error C2223: left of '->protocols'
must point to struct/union
1>..\libwebsockets\lib\pollfd.c(153): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(155): error C2065: 'pa' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(164): error C2065: 'pa' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(164): error C2224: left of '.prev_events'
must have struct/union type
1>..\libwebsockets\lib\pollfd.c(164): error C2065: 'pa' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(164): error C2224: left of '.events' must
have struct/union type
1>..\libwebsockets\lib\pollfd.c(166): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(166): warning C4047: 'function' :
'libwebsocket_context *' differs in levels of indirection from 'int'
1>..\libwebsockets\lib\pollfd.c(166): warning C4024:
'lws_plat_change_pollfd' : different types for formal and actual parameter 1
1>..\libwebsockets\lib\pollfd.c(166): error C2065: 'pfd' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(166): warning C4047: 'function' :
'libwebsocket_pollfd *' differs in levels of indirection from 'int'
1>..\libwebsockets\lib\pollfd.c(166): warning C4024:
'lws_plat_change_pollfd' : different types for formal and actual parameter 3
1>..\libwebsockets\lib\pollfd.c(171): error C2065: 'sampled_tid' :
undeclared identifier
1>..\libwebsockets\lib\pollfd.c(171): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(171): error C2223: left of '->service_tid'
must point to struct/union
1>..\libwebsockets\lib\pollfd.c(172): error C2065: 'sampled_tid' :
undeclared identifier
1>..\libwebsockets\lib\pollfd.c(173): error C2065: 'tid' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(173): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(173): error C2223: left of '->protocols'
must point to struct/union
1>..\libwebsockets\lib\pollfd.c(173): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(175): error C2065: 'tid' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(175): error C2065: 'sampled_tid' :
undeclared identifier
1>..\libwebsockets\lib\pollfd.c(176): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(176): warning C4047: 'function' :
'libwebsocket_context *' differs in levels of indirection from 'int'
1>..\libwebsockets\lib\pollfd.c(176): warning C4024:
'libwebsocket_cancel_service' : different types for formal and actual
parameter 1
1>..\libwebsockets\lib\pollfd.c(180): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(180): error C2223: left of '->protocols'
must point to struct/union
1>..\libwebsockets\lib\pollfd.c(180): error C2065: 'context' : undeclared
identifier
1>..\libwebsockets\lib\pollfd.c(181): error C2065: 'pa' : undeclared
identifier
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.38
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



-- 
Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20141215/ad7a1117/attachment.html>


More information about the Libwebsockets mailing list