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

Error: expected class-name before '{' token #695

Closed
Black2vs2 opened this issue Jul 14, 2021 · 2 comments
Closed

Error: expected class-name before '{' token #695

Black2vs2 opened this issue Jul 14, 2021 · 2 comments

Comments

@Black2vs2
Copy link

Getting an error while trying to import WebSockets to my project.
Import code:

#include <SocketIOclient.h>
#include <WebSocketsClient.h>
#include <WiFiUdp.h>

Error:

In file included from src\main.cpp:19:
lib\arduinoWebSockets-2.3.5\src/SocketIOclient.h:38:51: error: expected class-name before '{' token
@Links2004
Copy link
Owner

Hi,
how to reproduce this?
all examples in this repo are building fine.

the linked commit, shows many space changes, what are the parts that that are really needed?

@Black2vs2
Copy link
Author

Hi,

  1. I just downloaded the arduinoWebSockets library from platformio.
  2. Used the automatic "add to project" button on the arduinoWebSockets library.
  3. Tried importing on main these 2 headers:
#include <SocketIOclient.h>
#include <WebSocketsClient.h>
  1. On build i get the error written above.

Sorry for the commit, didn't realize the space changes.
The fix would be on line 12 (adding #include "WebSocketsClient.h")

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

2 participants