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

Compile error on PlatformIO BLEMIDI_Namespace.h #101

Open
dannyrubin opened this issue Mar 13, 2025 · 11 comments
Open

Compile error on PlatformIO BLEMIDI_Namespace.h #101

dannyrubin opened this issue Mar 13, 2025 · 11 comments

Comments

@dannyrubin
Copy link

In PlatformIO I've included the lastest library https://github.com/lathoub/Arduino-BLE-MIDI.git in my lib_deps. Upon compiling I get several errors, the first in BLEMIDI_Namespace.h stating "expected declaration before '}' token [Ln 5 Col 44] " and then several subsequent errors in BLEMIDI_Transport.h because of this , e.g. 'MIDI_NAMESPACE' is not a namespace-name [Ln 15 Col 17].

Can anyone suggest why this might be and how I can resolve it?
Thanks in advance

@samspencer5991
Copy link

I've also experienced this when switching from the PIO v2.2 to directly GH sourced.

@lathoub
Copy link
Owner

lathoub commented Mar 21, 2025

With the awaited release of the underlying MIDI library, PIO gets really confused. Best is to code the code from the Repo's at this stage (and not used the release libs)

@samspencer5991
Copy link

I was previously using the PIO managed library version (although out dated), however, this issue is happening when I directly reference this GH repo using the https link due to needing to update the codebase.

@samspencer5991
Copy link

@lathoub any update on this? Perhaps some more info about what issue with the forty seven effects library could be useful. Let me know if you need a hand with any of the upcoming library integration testing.

@lathoub
Copy link
Owner

lathoub commented Mar 29, 2025

I have no plan to support PlatformIO, but willing to plan to do a release here so it works with 47effects base lib (v5.0.2) and wiht the latest versions of ESP32 NimBLE, ESP32 and ArduinoBLE)

The namespace error i'm unable to reproduce.

What hardware do you use? (which include do you use?)

#include <hardware/BLEMIDI_ESP32_NimBLE.h>
#include <hardware/BLEMIDI_ESP32.h>
#include <hardware/BLEMIDI_ArduinoBLE.h>

@lathoub
Copy link
Owner

lathoub commented Mar 29, 2025

I fixed the ArduinoBLE implementation (albeit still have to implement receiving from BLE).
Try with code from the branch main with the library Release 5.0.2 of the MIDI library and let me know if this works.

If that works i'll create a 2.3 version

@samspencer5991
Copy link

Ok will do and report back

@samspencer5991
Copy link

Yep, still having compilation issues. Using the ESP32 platform by the way. I was initially using an older version of the library until I ran into various debug Serial.print actions which had been left in. These compilation errors came after updating this BLE-MIDI library.

It seems to be an incompatibility with the MIDI and NimBLE-Arduino libraries:

Image

@lathoub
Copy link
Owner

lathoub commented Apr 1, 2025

I've tested with a clean install using the Arduino IDE, using the latest Arduino ESP32 3.1.3, NimBLE 2.2.3 and MIDI 5.0.2.

I do notice you used the BLE_Client example (correct?), which has issues for the moment (@RobertoHE will fix when he has time). Or @samspencer5991 maybe you can look at the template code and suggest a fix - happy to accept PR's

@samspencer5991
Copy link

Yep, not using the client example, but using parts of the client library for configuration based switching. @RobertoHE I'm happy to take a look at the issues and suggest a fix, but I don't want to make things too messy if you're already working on something. I'll report back.

@RobertoHE
Copy link
Contributor

Check #102

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

4 participants