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

PlatformIO error 'marked override' #246

Open
CasperHxR47 opened this issue Dec 12, 2024 · 3 comments
Open

PlatformIO error 'marked override' #246

CasperHxR47 opened this issue Dec 12, 2024 · 3 comments

Comments

@CasperHxR47
Copy link

Hello, your library looks great! I'm getting the following error when using it for the first time today.

Error:
BLEConnectionStatus.h
'void BleConnectionStatus::onConnect(NimBLEServer*, NimBLEConnInfo&)' marked 'override', but does not override [Ln 17, Col 10]
'void BleConnectionStatus::onDisconnect(NimBLEServer*, NimBLEConnInfo&)' marked 'override', but does not override [Ln 18, Col 10]

BLEOutputReceiver.h
'void BLEOutputReceiver::onWrite(NimBLECharacteristic*,NimBLEConnInfo&)' marked 'override', but does not override [Ln17, Col 10]

It seems that the Arduino IDE auto-includes a previous declaration if there isn't one. PlatformIO doesn't do that.

I removed the 'override' statement at the end of those 3 lines and recompiled without a problem.

@Sab1e-GitHub
Copy link
Contributor

Hello @CasperHxR47 ,

Judging from the compilation errors, you need to manually install version 2.0.0 of NimBLE Arduino. Although NimBLE hasn't released version 2.0.0 on GitHub, you can directly clone their repository to get the latest version.

For more information about this issue, you can check #240 .

@LeeNX
Copy link

LeeNX commented Dec 12, 2024

Could also clone the NimBLE Arduino repo, but that did not work for me.

I updated my platformio.ini

lib_deps = 
  # lemmingdev/ESP32-BLE-Gamepad@^0.5.4
  # https://github.com/lemmingDev/ESP32-BLE-Gamepad.git#cdf05b3fccdee7fb5546fb3b0262f6c91e1b0efa
  https://github.com/Sab1e-GitHub/ESP32-BLE-Gamepad.git#v0.5.6.1
  h2zero/NimBLE-Arduino@^1.4.3

@CasperHxR47
Copy link
Author

h2zero/NimBLE-Arduino was just updated to 2.1.0! All is working now. Thank you all!

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

3 participants