0 votes
in Touch Interface by (120 points)

Hi,

I soldered the spotify remote kit together and wanted to compile the software from github. After following the manual carefully, I'm still stuck with the following error:

In file included from /

Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/StreamDev.h:25, from /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:31, from /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/libraries/ESP8266WebServer/src/ESP8266WebServer.h:349, from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/SpotifyClient.h:28, from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/esp8266-spotify-remote.ino:32: /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/StreamString.h:49:50: error: macro "max" requires 2 arguments, but only 1 given

49 | return std::numeric_limits::max(); | ^ In file included from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/esp8266-spotify-remote.ino:28: /Users/user/Documents/Arduino/libraries/Mini_Grafx/src/MiniGrafx.h:79: note: macro "max" defined here 79 | #define max(a,b) ((a)>(b)?(a):(b)) | In file included from /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:31, from /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/libraries/ESP8266WebServer/src/ESP8266WebServer.h:349, from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/SpotifyClient.h:28, from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/esp8266-spotify-remote.ino:32: /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/StreamDev.h:51:50: error: macro "max" requires 2 arguments, but only 1 given 51 | return std::numeric_limits::max(); | ^ In file included from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/esp8266-spotify-remote.ino:28: /Users/user/Documents/Arduino/libraries/Mini_Grafx/src/MiniGrafx.h:79: note: macro "max" defined here 79 | #define max(a,b) ((a)>(b)?(a):(b)) | In file included from /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:31, from /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/libraries/ESP8266WebServer/src/ESP8266WebServer.h:349, from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/SpotifyClient.h:28, from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/esp8266-spotify-remote.ino:32: /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/StreamDev.h:118:50: error: macro "max" requires 2 arguments, but only 1 given 118 | return std::numeric_limits::max(); | ^ In file included from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/esp8266-spotify-remote.ino:28: /Users/user/Documents/Arduino/libraries/Mini_Grafx/src/MiniGrafx.h:79: note: macro "max" defined here 79 | #define max(a,b) ((a)>(b)?(a):(b)) | In file included from /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h:31, from /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/libraries/ESP8266WebServer/src/ESP8266WebServer.h:349, from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/SpotifyClient.h:28, from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/esp8266-spotify-remote.ino:32: /Users/user/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/StreamDev.h:145:50: error: macro "max" requires 2 arguments, but only 1 given 145 | return std::numeric_limits::max(); | ^ In file included from /Users/user/Documents/Arduino/esp8266-spotify-remote-master_2/esp8266-spotify-remote/esp8266-spotify-remote.ino:28: /Users/user/Documents/Arduino/libraries/Mini_Grafx/src/MiniGrafx.h:79: note: macro "max" defined here 79 | #define max(a,b) ((a)>(b)?(a):(b)) | exit status 1 Compilation error: exit status 1

by (120 points)
I picked a fresh laptop and installed from scratch to get these last two errors out of the way - so far no luck...

/Users/user/Documents/Arduino/esp8266-spotify-remote/esp8266-spotify-remote.ino:268:70: error: no matching function for call to 'min(long unsigned int, uint32_t&)'
  268 |   drawProgress(min(data.progressMs + timeSinceUpdate, data.durationMs), data.durationMs, data.title, data.artistName, data.isPlaying, data.isPlayerActive);

/Users/user/Documents/Arduino/esp8266-spotify-remote/SpotifyClient.cpp:454:15: error: call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url)
  454 |     http.begin(url);

Any ideas?

1 Answer

0 votes
by (19.9k points)

As stated by email earlier you must have an older copy of Mini Grafx in your Arduino path somewhere. There error messages says

/Users/user/Documents/Arduino/libraries/Mini_Grafx/src/MiniGrafx.h:79: note: macro "max" defined here 79

However, if you check line 79 of MiniGrafx.h in version 1.2.6 (ie. the current version) it's an empty line. Whereas if you do the same for version 1.2.5 you'll find the max macro that we later removed.

by (120 points)
Thanks Marcel - Upon your last mail I removed the 1.2.5 library and installed the 1.2.6 library. I just removed the complete folder from /libraries, restarted the IDE and reinstalled the 1.2.6 version - still the same error.

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.

https://thingpulse.com

...