[Libwebsockets] protocol_example_standalone / Win32

Joel Winarske joel.winarske at gmail.com
Sun Jan 29 02:42:35 CET 2017


It was missing the two exports:
1. destroy_protocol_example_standalone
2. init_protocol_example_standalone

It is a configuration issue with the VS project.  After matching project
parameters against known good plugin it's working fine.

It involves a multitude of manual steps after what CMakeLists.txt generates.

On Sat, Jan 28, 2017 at 12:42 PM, Andy Green <andy at warmcat.com> wrote:

>
>
> On 29 January 2017 03:09:34 GMT+08:00, Joel Winarske <
> joel.winarske at gmail.com> wrote:
> >I am attempting to have lwsws load plugin
> >protocol_example_standalone.dll.
> >
> >I'm seeing:
> >[2017/01/28 10:43:10:2640] ERR: Failed to get init on
> >protocol_example_standalone.dll: The specified procedure could not be
> >found.
> >
> >It loads all the other plugins built with libwebsocket without error.
> >
> >Any ideas?
>
> The names of the exports in the plugin must match the plugin name.
>
> For example 'plugin_standalone' exports 'init_protocol_example_
> standalone'.
>
> The other reason I can imagine is maybe no exports or decorated exports
> from your plugin dll... you need some objdump like tool to check it.
>
> -Andy
>
> >
> >Thanks,
> >Joel
> >
> >
> >Building this plugin on Windows required some fiddling:
> >
> >
> >*libwebsockets plugin-standalone*
> >1. Open VS2015 x86 Native Tools window
> >2. cd C:\Users\joel\Documents\GitHub\libwebsockets\plugin-standalone
> >3. mkdir build
> >4. cd build
> >5.
> >C:\Users\joel\Documents\GitHub\libwebsockets\plugin-
> standalone\build>cmake
> >.. -DLWS_WITH_LWSWS=1
> >-DLWS_OPENSSL_INCLUDE_DIRS=C:\OpenSSL-Win32\include
> >-DLWS_LIBUV_LIBRARIES=C:\Users\joel\Documents\GitHub\
> libuv\Debug\lib\libuv.lib
> >-DLWS_LIBUV_INCLUDE_DIRS=C:\Users\joel\Documents\GitHub\libuv\include
> >
> >6. Open the protocol_example_standalone sln file, and update as
> >follows:
> >
> >VC++ Directories->Include Directories <append>
> >C:\Users\joel\Documents\GitHub\libuv\include;C:\OpenSSL-Win32\include
> >VC++ Directories->Library Directories <append>
> >C:\Users\joel\Documents\GitHub\libwebsockets\build\
> lib\Debug;C:\Users\joel\Documents\GitHub\libuv\Debug\lib
> >Linker->Input <append>
> >websockets.lib;libuv.lib;ws2_32.lib;;userenv.lib;psapi.lib;iphlpapi.lib
> >
> >7. Build.  you get protocol_example_standalone.dll.  Drop this into
> >your
> >lwsws plugin directory.
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20170128/e34f51f5/attachment-0002.html>


More information about the Libwebsockets mailing list