TinyWebsockets icon indicating copy to clipboard operation
TinyWebsockets copied to clipboard

Build errors.

Open nethomas1968 opened this issue 1 year ago • 0 comments

Using Ubuntu 20.04, I get this error when doing "make demo_echo_client" :+1: Scanning dependencies of target tiny_websockets_lib [ 8%] Building CXX object tiny_websockets_lib/CMakeFiles/tiny_websockets_lib.dir/src/crypto.cpp.o [ 16%] Building CXX object tiny_websockets_lib/CMakeFiles/tiny_websockets_lib.dir/src/linux_tcp.cpp.o [ 25%] Building CXX object tiny_websockets_lib/CMakeFiles/tiny_websockets_lib.dir/src/message.cpp.o [ 33%] Building CXX object tiny_websockets_lib/CMakeFiles/tiny_websockets_lib.dir/src/openssl_secure_tcp_client.cpp.o [ 41%] Building CXX object tiny_websockets_lib/CMakeFiles/tiny_websockets_lib.dir/src/websockets_client.cpp.o /home/nick_thomas/Data/Utils/WebSockets/TinyWebsockets/TinyWebsockets/tiny_websockets_lib/src/websockets_client.cpp: In function ‘websockets::HandshakeRequestResult websockets::generateHandshake(const WSString&, const WSString&, const std::vector<std::pair<std::__cxx11::basic_string, std::__cxx11::basic_string > >&)’: /home/nick_thomas/Data/Utils/WebSockets/TinyWebsockets/TinyWebsockets/tiny_websockets_lib/src/websockets_client.cpp:111:25: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move] 111 | return std::move(result); | ~~~~~~~~~^~~~~~~~ /home/nick_thomas/Data/Utils/WebSockets/TinyWebsockets/TinyWebsockets/tiny_websockets_lib/src/websockets_client.cpp:111:25: note: remove ‘std::move’ call /home/nick_thomas/Data/Utils/WebSockets/TinyWebsockets/TinyWebsockets/tiny_websockets_lib/src/websockets_client.cpp: In member function ‘bool websockets::WebsocketsClient::send(const char*)’: /home/nick_thomas/Data/Utils/WebSockets/TinyWebsockets/TinyWebsockets/tiny_websockets_lib/src/websockets_client.cpp:352:33: error: ‘strlen’ was not declared in this scope 352 | return this->send(data, strlen(data)); | ^~~~~~ /home/nick_thomas/Data/Utils/WebSockets/TinyWebsockets/TinyWebsockets/tiny_websockets_lib/src/websockets_client.cpp:6:1: note: ‘strlen’ is defined in header ‘’; did you forget to ‘#include ’? 5 | #include <tiny_websockets/internals/wscrypto/crypto.hpp> +++ |+#include 6 | cc1plus: all warnings being treated as errors make[3]: *** [tiny_websockets_lib/CMakeFiles/tiny_websockets_lib.dir/build.make:115: tiny_websockets_lib/CMakeFiles/tiny_websockets_lib.dir/src/websockets_client.cpp.o] Error 1 make[2]: *** [CMakeFiles/Makefile2:263: tiny_websockets_lib/CMakeFiles/tiny_websockets_lib.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:189: CMakeFiles/demo_echo_client.dir/rule] Error 2 make: *** [Makefile:188: demo_echo_client] Error 2

Thought you should know.

nethomas1968 avatar Sep 22 '23 09:09 nethomas1968