You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got compile error after including Segment.h in my sketch:
/Users/kamilton/Documents/Arduino/libraries/Segment/src/Segment.cpp:53:203: error: default argument given for parameter 17 of 'Segment::Segment(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, bool)' [-fpermissive]
Segment::Segment(int sega1, int sega2, int segb, int segc, int segd1, int segd2, int sege, int segf, int segg1, int segg2, int segh, int segi, int segj, int segk, int segl, int segm, bool cathode = true){ // 16seg, no dp
^
In file included from /Users/kamilton/Documents/Arduino/libraries/Segment/src/Segment.cpp:9:0:
/Users/kamilton/Documents/Arduino/libraries/Segment/src/Segment.h:35:5: note: previous specification in 'Segment::Segment(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, bool)' here
Segment(int sega1,
^~~~~~~
/Users/kamilton/Documents/Arduino/libraries/Segment/src/Segment.cpp:90:214: error: default argument given for parameter 18 of 'Segment::Segment(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, bool)' [-fpermissive]
Segment::Segment(int sega1, int sega2, int segb, int segc, int segd1, int segd2, int sege, int segf, int segg1, int segg2, int segh, int segi, int segj, int segk, int segl, int segm, int segdp, bool cathode = true){ // 16seg, dp
^
In file included from /Users/kamilton/Documents/Arduino/libraries/Segment/src/Segment.cpp:9:0:
/Users/kamilton/Documents/Arduino/libraries/Segment/src/Segment.h:53:5: note: previous specification in 'Segment::Segment(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, bool)' here
Segment(int sega1,
^~~~~~~
exit status 1
Compilation error: exit status 1
Happens even for empty sketch:
#include <Segment.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
The text was updated successfully, but these errors were encountered:
The problem lies in the Segment.cpp file, where it looks like the developer accidentally left default values in a few overloads for the Segment function. I just fixed this myself by editing the source (which, of course, one should NEVER do unless they absolutely know what they are doing).
I'll send a pull request (if that even gets accepted) and also fork the repo to add this change.
Arduino version:
Version: 2.3.2
Date: 2024-02-20T09:57:46.613Z
CLI Version: 0.35.3
Copyright © 2024 Arduino SA
Segment 3.0.0 installed
I got compile error after including Segment.h in my sketch:
Happens even for empty sketch:
The text was updated successfully, but these errors were encountered: