I’ve created a new app for Asterisk in C using libwebsockets 1.4. I made the so file (make and make install, no errors reported) but when I try to load the module in Asterisk I get errors pointing to libwebsockets library.
loader.c:599 load_dynamic_module: Error loading module ‘app_x.so’: /usr/lib/asterisk/modules/app_xxxxx.so: undefined symbol: libwebsocket_service
When I run ldd /usr/app_x.so I get this:
linux-vdso.so.1 => (0x00007ffc45d3a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f160f0e2000)
libc.so.6 => /lib64/libc.so.6 (0x00007f160ed4e000)
It seems the libwebsockets is not linked properly even if the header is defined in my app. I checked the libwebsockets with pkg-config --modversion and I get 1.4 (current rev of libwebsockets library installed on the machine)…
What is the right way to link the libwebsockets to my app? Do I have to change the plugin build config?