[Libwebsockets] protocol_example_standalone / Win32

Andy Green andy at warmcat.com
Sat Jan 28 21:42:42 CET 2017



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.



More information about the Libwebsockets mailing list