[Libwebsockets] Compilation error

Steve Calfee stevecalfee at gmail.com
Fri Jul 23 01:22:20 CEST 2021


Is that an option for Cmake or make? What other generally useful options
are there?

Also, can I get a non-root (/etc/...) accessible conf dir for lwsws? Useful
for testing, I think.

I know cmake makes crossplatform builds easier, but adds a level of
indirection that I don't exactly understand. I am building on linux mint.

Thanks, Steve



On Wed, Jul 21, 2021 at 9:19 PM Andy Green <andy at warmcat.com> wrote:

>
>
> On 7/21/21 9:46 PM, loic nicolas wrote:
> > Good evening,
> >
> > I get this error when I try to run one of the examples:
> >
> > |1> main.obj: error LNK2001: unresolved external symbol
> > _lws_retry_sul_schedule_retry_wsi 1> main.obj: error LNK2001: unresolved
> > external symbol _lws_retry_sul_schedule 1> main.obj: error LNK2001:
> > unresolved external symbol _lws_get_context 1> main.obj: error LNK2001:
> > unresolved external symbol _lws_extension_callback_pm_deflate 1>
> > main.obj: error LNK2001: unresolved external symbol _lws_strncpy 1>
> > main.obj: error LNK2001: unresolved external symbol
> > _lws_callback_http_dummy 1> main.obj: error LNK2001: unresolved external
> > symbol _lws_service 1> main.obj: error LNK2001: unresolved external
> > symbol _lws_sul_schedule 1> main.obj: error LNK2001: unresolved external
> > symbol __lws_log 1> main.obj: error LNK2001: unresolved external symbol
> > _lws_sul_cancel 1> main.obj: error LNK2001: unresolved external symbol
> > _lws_context_destroy 1> main.obj: error LNK2001: unresolved external
> > symbol _lws_create_context 1> main.obj: error LNK2001: unresolved
> > external symbol _lws_cmdline_option_handle_builtin 1> main.obj: error
> > LNK2001: unresolved external symbol _lws_json_simple_find |
> >
> > I compiled the library using visual studio 2019 and i have link
> > websockets.lib
> > How to deal with this problem please?
>
> You seem to be building something and not linking the libwebsockets
> library binary to it.
>
> If you just want to build the examples, you can build all that apply to
> your library build options with -DLWS_WITH_MINIMAL_EXAMPLES=1 when you
> build the library.
>
> Otherwise use vc to tell it to also link to lws library.
>
> -Andy
>
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20210722/ab771b0c/attachment.htm>


More information about the Libwebsockets mailing list