Error with installed libraries from github

Hey! So currently i want to make a websocket client with an Arduino mega 2560. My problem is that every time i download a websocket client package from the GitHub i get errors like these:

*\ArduinoWebsocketClientmaster\WebSocketClient.cpp:30:1: error: 'prog_char' does not name a type; did you mean 'putchar'?
 prog_char stringVar[] PROGMEM = "{0}";
 ^~~~~~~~~

In file included from*\Documents\Arduino\libraries\WebSockets2_Generic-master\src/Tiny_Websockets_Generic/client.hpp:33:0,
from *\Documents\Arduino\libraries\WebSockets2_Generic-master\src/WebSockets2_Generic.h:42,
from *\Let├Âlt├ęsek\Timer\Jó\sketch_aug1a\sketch_aug1a.ino:20:
*\Documents\Arduino\libraries\WebSockets2_Generic-master\src/Tiny_Websockets_Generic/internals/websockets_endpoint.hpp:32:10: fatal error: memory: No such file or directory
#include
^~~~~~~~

In file included from *\Documents\Arduino\libraries\arduinoWebSockets\src/WebSocketsClient.h:28:0,
                 from *\sketch_aug1a\sketch_aug1a.ino:17:
*\Documents\Arduino\libraries\arduinoWebSockets\src/WebSockets.h:37:2: error: #error Version 2.x.x currently does not support Arduino with AVR since there is no support for std namespace of c++.
 #error Version 2.x.x currently does not support Arduino with AVR since there is no support for std namespace of c++.
  ^~~~~

(At the last one i deleted my 2.0.0 IDE and installed the 1.8.9 but nothing changed.)
Can any1 help me please? Thank you

Did you read the error message, particularly

currently does not support Arduino with AVR

What processor architecture does the Mega2560 use ?

Did you try V1.3.0 of this one?

WebSockets for Arduino (Server + Client)
use 2.x.x for ESP and 1.3 for AVR

You can download it from:
https://downloads.arduino.cc/libraries/github.com/Links2004/WebSockets-1.3.0.zip

1 Like

In this error message, the "2.x.x" is referring to the version of the "WebSockets" library, not to the version of the Arduino IDE.

1 Like

Now it works! I have installed the V1.3.0 and now its ok! Thank you guys!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.