After I installed libwebsockets 1.4, I wanted to make Mosquitto 1.4.8 run witch Websockets. But when I compile I get some Errors:
user@Mate:~/Dokumente/mosquitto-1.4.8$ make
set -e; for d in lib client src; do make -C ${d}; done
make[1]: Entering directory »/home/user/Dokumente/mosquitto-1.4.8/lib«
make -C cpp
make[2]: Entering directory »/home/user/Dokumente/mosquitto-1.4.8/lib/cpp«
make[2]: Nothing to do for target »all«.
make[2]: Leaving directory »/home/user/Dokumente/mosquitto-1.4.8/lib/cpp«
make[1]: Leaving directory »/home/user/Dokumente/mosquitto-1.4.8/lib«
make[1]: Entering directory »/home/user/Dokumente/mosquitto-1.4.8/client«
make[1]: Nothing to do for target »all«.
make[1]: Leaving directory »/home/user/Dokumente/mosquitto-1.4.8/client«
make[1]: Entering directory »/home/user/Dokumente/mosquitto-1.4.8/src«
cc mosquitto.o bridge.o conf.o context.o database.o logging.o loop.o memory_mosq.o persist.o net.o net_mosq.o read_handle.o read_handle_client.o read_handle_server.o read_handle_shared.o security.o security_default.o send_client_mosq.o send_mosq.o send_server.o service.o subs.o sys_tree.o time_mosq.o tls_mosq.o util_mosq.o websockets.o will_mosq.o -o mosquitto -ldl -lm -lrt -Wl,--dynamic-list=linker.syms -lssl -lcrypto -luuid -lwebsockets loop.o:
In function 'do_disconnect':
/home/user/Dokumente/mosquitto-1.4.8/src/loop.c:404: undefined reference to `lws_callback_on_writable' loop.o:
In function 'mosquitto_main_loop': /home/user/Dokumente/mosquitto-1.4.8/src/loop.c:378: undefined reference to `lws_service'
collect2: error: ld returned 1 exit status
make[1]: *** [mosquitto] Error 1
make[1]: Leaving directory »/home/user/Dokumente/mosquitto-1.4.8/src«
make: *** [mosquitto] Error 2
Information: I tested Mosquitto two days before without Websockets and it worked well but when I want to compile it again (no matter if I choose Websockets or not) I get these Errors.
Looks like your websocket library is not correctly installed.
Try it :
sudo apt-get install libwebsockets-dev
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.