Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors. #26

Open
nethomas1968 opened this issue Sep 22, 2023 · 0 comments
Open

Build errors. #26

nethomas1968 opened this issue Sep 22, 2023 · 0 comments

Comments

@nethomas1968
Copy link

Using Ubuntu 20.04, I get this error when doing "make demo_echo_client" 👍
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant