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

ESP8266 OSCData(int) cannot be overloaded with OSCData(intOSC_t) #151

Open
clizzy2 opened this issue Aug 15, 2024 · 7 comments
Open

ESP8266 OSCData(int) cannot be overloaded with OSCData(intOSC_t) #151

clizzy2 opened this issue Aug 15, 2024 · 7 comments

Comments

@clizzy2
Copy link

clizzy2 commented Aug 15, 2024

Hi!

I'm very new to arduino, and C++, but I can't verify any of the example files of the ESP8266 because I get the following errors

In file included from v:\Arduino\libraries\OSC\OSCMessage.h:29,
from v:\Arduino\libraries\OSC\OSCBundle.h:29,
from v:\Arduino\libraries\OSC\OSCBundle.cpp:26:
v:\Arduino\libraries\OSC\OSCData.h:124:5: error: 'OSCData::OSCData(int)' cannot be overloaded with 'OSCData::OSCData(intOSC_t)'
124 | OSCData (int);
| ^~~~~~~
v:\Arduino\libraries\OSC\OSCData.h:121:3: note: previous declaration 'OSCData::OSCData(intOSC_t)'
121 | OSCData (intOSC_t);
| ^~~~~~~
In file included from v:\Arduino\libraries\OSC\OSCData.cpp:2:
v:\Arduino\libraries\OSC\OSCData.h:124:5: error: 'OSCData::OSCData(int)' cannot be overloaded with 'OSCData::OSCData(intOSC_t)'
124 | OSCData (int);
| ^~~~~~~
v:\Arduino\libraries\OSC\OSCData.h:121:3: note: previous declaration 'OSCData::OSCData(intOSC_t)'
121 | OSCData (intOSC_t);
| ^~~~~~~
v:\Arduino\libraries\OSC\OSCData.cpp:42:1: error: redefinition of 'OSCData::OSCData(int)'
42 | OSCData::OSCData(int i){
| ^~~~~~~
v:\Arduino\libraries\OSC\OSCData.cpp:34:1: note: 'OSCData::OSCData(intOSC_t)' previously defined here
34 | OSCData::OSCData(intOSC_t i){
| ^~~~~~~
In file included from v:\Arduino\libraries\OSC\OSCMessage.h:29,
from v:\Arduino\libraries\OSC\OSCMessage.cpp:26:
v:\Arduino\libraries\OSC\OSCData.h:124:5: error: 'OSCData::OSCData(int)' cannot be overloaded with 'OSCData::OSCData(intOSC_t)'
124 | OSCData (int);
| ^~~~~~~
v:\Arduino\libraries\OSC\OSCData.h:121:3: note: previous declaration 'OSCData::OSCData(intOSC_t)'
121 | OSCData (intOSC_t);
| ^~~~~~~

exit status 1

Compilation error: exit status 1

On 1.5.8 the recommended IDE I get this error:
Arduino: 1.5.8 (Windows 8), Board: "Arduino Uno"

In file included from ESP8266ReceiveBundle.ino:7:0:
V:\Arduino\libraries\OSC/SLIPEncodedSerial.h:243:7: error: expected nested-name-specifier before 'SLIPEncodedSerial'
using SLIPEncodedSerial = _SLIPSerial ;
^
V:\Arduino\libraries\OSC/SLIPEncodedSerial.h:243:7: error: 'SLIPEncodedSerial' has not been declared
V:\Arduino\libraries\OSC/SLIPEncodedSerial.h:243:25: error: expected ';' before '=' token
using SLIPEncodedSerial = _SLIPSerial ;
^
V:\Arduino\libraries\OSC/SLIPEncodedSerial.h:243:25: error: expected unqualified-id before '=' token
ESP8266ReceiveBundle.ino: In function 'void setup()':
ESP8266ReceiveBundle.ino:79:22: error: 'class WiFiUDP' has no member named 'localPort'
Error compiling.

@julienrobert
Copy link

Hi, I have the same issue. I'm on Mac 14.6.1 Apple Silicon M2.

I tested with 1.8.19 and 2.3.2. 1.5.8 won't run on my system.

@TyIsI
Copy link
Contributor

TyIsI commented Aug 29, 2024

Version 3.5.8 should work as intended:

https://github.com/CNMAT/OSC/releases/tag/3.5.8

@adrianfreed It looks like a1fc012 introduced a regression?

@julienrobert
Copy link

I'm still having the issue.

@TyIsI
Copy link
Contributor

TyIsI commented Sep 9, 2024

@julienrobert which version of the OSC library are you using?

@julienrobert
Copy link

I tried the latest and 3.5.8.

@zealtv
Copy link

zealtv commented Oct 10, 2024

Same issue here.

Tested on:

  • Mac Silicon 14.6.1
  • Arduino 2.3.3 and 1.8.19
  • OSC library versions 3.5.8, 1.35, and 1.37.

Trying to build this sketch which has built happily in the past.


Edit:
I found explicitly casting the argument to OSCMessage.add(datum) allowed the sketch to build.

This didn't compile:

    OSCMessage msg(oscAddress.c_str());
    for (int i = 0; i < NUMTOUCHPINS; i++) msg.add(touchInputs[i].currentValue );

This did:

    OSCMessage msg(oscAddress.c_str());
    for (int i = 0; i < NUMTOUCHPINS; i++) msg.add( (unsigned int)touchInputs[i].currentValue );

@julienrobert
Copy link

Just to say that it's still working normally on my old MacBook Pro Intel i7 with latest OS. But not on my Apple Silicon MacBook Pro.

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