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

expected initializer before '}' token #1351

Closed
Raffax00 opened this issue Nov 15, 2020 · 2 comments
Closed

expected initializer before '}' token #1351

Raffax00 opened this issue Nov 15, 2020 · 2 comments
Labels
help wanted Requesting support stale

Comments

@Raffax00
Copy link

Hi I'm programming a esp8266 on Arduino but I keep getting this error, how can i solve it?

expected initializer before '}' token

Arduino:1.8.12 (Mac OS X), Scheda:"NodeMCU 0.9 (ESP-12 Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"

In file included from sketch/Accesspoints.h:7:0,
from sketch/Accesspoints.cpp:1:
/Users/raffaele/Library/Arduino15/packages/esp8266/hardware/esp8266/2.0.0/tools/sdk/include/user_interface.h:451:39: error: 'freedom_outside_cb_t' was not declared in this scope
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb); void wifi_unregister_send_pkt_freedom__cb(void); int wifi_send_pkt_freedom(uint8 **buf, int len, bool sys_seq)
^
In file included from sketch/Accesspoints.cpp:1:0:
Accesspoints.h:8:1: error: expected initializer before '}' token
}
^
In file included from sketch/Attack.h:7:0,
from sketch/Attack.cpp:1:
/Users/raffaele/Library/Arduino15/packages/esp8266/hardware/esp8266/2.0.0/tools/sdk/include/user_interface.h:451:39: error: 'freedom_outside_cb_t' was not declared in this scope
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb); void wifi_unregister_send_pkt_freedom__cb(void); int wifi_send_pkt_freedom(uint8 *buf, int len, bool sys_seq)
^
In file included from sketch/Attack.h:9:0,
from sketch/Attack.cpp:1:
language.h:6:1: error: expected initializer before 'extern'
extern String str(const char
ptr);

^
In file included from sketch/CLI.h:8:0,
from sketch/CLI.cpp:1:
/Users/raffaele/Library/Arduino15/packages/esp8266/hardware/esp8266/2.0.0/tools/sdk/include/user_interface.h:451:39: error: 'freedom_outside_cb_t' was not declared in this scope
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb); void wifi_unregister_send_pkt_freedom__cb(void); int wifi_send_pkt_freedom(uint8 *buf, int len, bool sys_seq)
^
In file included from sketch/CLI.h:10:0,
from sketch/CLI.cpp:1:
language.h:6:1: error: expected initializer before 'extern'
extern String str(const char
ptr);

^
In file included from sketch/Settings.h:7:0,
from sketch/DisplayUI.h:6,
from sketch/DisplayUI.cpp:1:
/Users/raffaele/Library/Arduino15/packages/esp8266/hardware/esp8266/2.0.0/tools/sdk/include/user_interface.h:451:39: error: 'freedom_outside_cb_t' was not declared in this scope
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb); void wifi_unregister_send_pkt_freedom__cb(void); int wifi_send_pkt_freedom(uint8 **buf, int len, bool sys_seq)
^
In file included from /Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Deserialization/../JsonBuffer.hpp:11:0,
from /Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Deserialization/JsonParser.hpp:7,
from /Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/JsonBufferBase.hpp:7,
from /Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/DynamicJsonBuffer.hpp:7,
from /Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson.hpp:9,
from /Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson.h:9,
from sketch/Settings.h:9,
from sketch/DisplayUI.h:6,
from sketch/DisplayUI.cpp:1:
/Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/Deserialization/../Data/NonCopyable.hpp:7:1: error: expected initializer before 'namespace'
namespace ArduinoJson {
^
In file included from /Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson.hpp:9:0,
from /Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson.h:9,
from sketch/Settings.h:9,
from sketch/DisplayUI.h:6,
from sketch/DisplayUI.cpp:1:
/Users/raffaele/Documents/Arduino/libraries/ArduinoJson/src/ArduinoJson/DynamicJsonBuffer.hpp:16:28: error: expected declaration before end of line
#pragma GCC diagnostic push
^
sketch/CLI.cpp: In member function 'void CLI::load()':
CLI.cpp:16:52: error: 'str' was not declared in this scope
String defaultValue = str(CLI_DEFAULT_AUTOSTART);

                                                ^

sketch/CLI.cpp: In member function 'uint32_t CLI::getTime(String)':
CLI.cpp:140:76: error: 'str' was not declared in this scope
else if (time.substring(time.length() - 3).equalsIgnoreCase(str(STR_MIN)) ||

                                                                        ^

sketch/CLI.cpp: In member function 'void CLI::runCommand(String)':
CLI.cpp:221:40: error: 'str' was not declared in this scope
if (list->get(0) == str(CLI_COMMENT)) {

                                    ^

CLI.cpp:571:47: error: 'str' was not declared in this scope
sprintf(s, str(CLI_RICE_OUTPUT).c_str(), i / 10);

                                           ^

CLI.cpp:713:41: error: 'str' was not declared in this scope
sprintf(s, str(CLI_SYSTEM_OUTPUT).c_str(), 81920 - system_get_free_heap_size(),

                                     ^

CLI.cpp:1044:60: error: 'str' was not declared in this scope
if (i == height) sprintf(s, str(CLI_DRAW_OUTPUT).c_str(),

                                                        ^

CLI.cpp:1046:69: error: 'str' was not declared in this scope
else if (i == height / 2) sprintf(s, str(CLI_DRAW_OUTPUT).c_str(),

                                                                 ^

CLI.cpp:1049:60: error: 'str' was not declared in this scope
else if (i == 0) sprintf(s, str(CLI_DRAW_OUTPUT).c_str(), 0);

                                                        ^

In file included from sketch/LED.h:6:0,
from sketch/LED.cpp:1:
/Users/raffaele/Library/Arduino15/packages/esp8266/hardware/esp8266/2.0.0/tools/sdk/include/user_interface.h:451:39: error: 'freedom_outside_cb_t' was not declared in this scope
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb); void wifi_unregister_send_pkt_freedom__cb(void); int wifi_send_pkt_freedom(uint8 *buf, int len, bool sys_seq)
^
In file included from sketch/LED.h:8:0,
from sketch/LED.cpp:1:
language.h:6:1: error: expected initializer before 'extern'
extern String str(const char
ptr);

^
sketch/Attack.cpp: In member function 'void Attack::status()':
Attack.cpp:129:25: error: 'str' was not declared in this scope
A_STATUS).c_str(), packetRate, deauthPkts, deauth.maxPkts, beaconPkts, beacon.maxPkts, probePkts,
^
sketch/Attack.cpp: In member function 'bool Attack::sendPacket(uint8_t*, uint16_t, uint8_t, uint16_t)':
Attack.cpp:412:60: error: 'wifi_send_pkt_freedom' was not declared in this scope
bool sent = wifi_send_pkt_freedom(packet, packetSize, 0) == 0;
^
exit status 1
expected initializer before '}' token

@Raffax00 Raffax00 added the help wanted Requesting support label Nov 15, 2020
@welcome
Copy link

welcome bot commented Nov 15, 2020

Thanks for opening your first issue here! 🎉
👉 Be sure to:
1. 🇬🇧 Communicate in English so everybody can understand you
2. 📖 Have a look at the Wiki and README for information
3. 🔍 Search for similar issues (open and closed)
4. ✍️ Provide enough information to understand, recreate and help out with your problem
5. ℹ️ Let us know if you find a solution and please share it with us
6. 📕 Close the issue when your problem has been solved

@stale
Copy link

stale bot commented Feb 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 13, 2021
@stale stale bot closed this as completed Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Requesting support stale
Projects
None yet
Development

No branches or pull requests

1 participant