[Libwebsockets] libwebsockets.h build error with g++

Chropin Hu chropinhu at gmail.com
Wed Feb 28 09:31:57 CET 2018


Dear All,
        I am developing a test program with c++.
        as following shows,

*#include <libwebsockets.h>*

*int main()*
*{*
* return 0;*
*}*

but the compile output:
     g++ -D__GXX_EXPERIMENTAL_CXX0X__ -O0 -g3 -Wall -c -fmessage-length=0
-std=c++0x -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.cpp"
In file included from ../main.cpp:9:0:
/usr/local/include/libwebsockets.h:1818:39: error: expected ‘,’ or ‘...’
before ‘private’
 lws_jwk_export(struct lws_jwk *s, int private, char *p, size_t len);

I have checked the libwebsockets.h line 1818:
lws_jwk_export(struct lws_jwk *s, int private, char *p, size_t len);

It`s seems that the funtion input param name comflct with c++ key word
private.

It`s a bug or am  i miss soming?

Yours Chropin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20180228/25e5fa41/attachment.html>


More information about the Libwebsockets mailing list