-
Notifications
You must be signed in to change notification settings - Fork 47
Error when compiling (warning: deprecated conversion & redeclaration) #45
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
Comments
It looks as though you may have a duplicate line in your file. I can't replicate that error here. Try compiling one of the examples to see if you have the same error. If so try downloading a fresh copy of the library. If not, you'll need to share your code to look into the issue further. The |
I just tried to compile the original example from the library still gives me the error. In file included from C:\Users\r4ph\Documents\Arduino\libraries\YoutubeApi-2.0.0\examples\ESP8266\ChannelStatistics\ChannelStatistics.ino:30:0:
|
That header has been modified. The |
I see. Should I just re-install or just copy paste the original header to mine? |
I just reinstall the library again. the re declaration is already gone .. but there are some warnings.. regarding string constant as below =============
|
As @dmadison points out, this is a modified code that didn't come with the library so it is not an issue with the library. Delete and re-install the library if you want to get back to a working version EDIT: Forgot to submit this last night and submitted it this morning, but see you have replied. Good to see that its working for your again. Warnings will be fixed in a future release but will not stop it from working. |
Thanks @dmadison and @witnessmenow for your support. |
hi I'm still new in this Arduino world, I used to work with this project, and works fine. no problem at all.
It's been quite a long time I don't get this project again until today I got this project and I tried to compile it and comes up with this error. I haven't change the code and it works fine before .. just replace the wifi id * pass and channel id.
below is the error message from the Arduino console:
In file included from F:\ESP32\Project\YT_IG_Counter_Fix\YT_IG_Counter_WIFI\YT_IG_Counter_WIFI.ino:19:0:
C:\Users\r4ph\Documents\Arduino\libraries\YoutubeApi-2.0.0\src/YoutubeApi.h:54:23: error: redeclaration of 'channelStatistics YoutubeApi::channelStats'
channelStatistics channelStats;
^
C:\Users\r4ph\Documents\Arduino\libraries\YoutubeApi-2.0.0\src/YoutubeApi.h:50:23: note: previous declaration 'channelStatistics YoutubeApi::channelStats'
channelStatistics channelStats;
^
F:\ESP32\Project\YT_IG_Counter_Fix\YT_IG_Counter_WIFI\YT_IG_Counter_WIFI.ino:50:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
YoutubeApi api(API_KEY, client);
^
F:\ESP32\Project\YT_IG_Counter_Fix\YT_IG_Counter_WIFI\YT_IG_Counter_WIFI.ino: In function 'void loop()':
F:\ESP32\Project\YT_IG_Counter_Fix\YT_IG_Counter_WIFI\YT_IG_Counter_WIFI.ino:109:46: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
if (api.getChannelStatistics(CHANNEL_ID))
^
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
================================
I hope some can help me how to resolve this error.
Thanks in Advance
Rafael
I'm using :
Wemos D1 mini
Arduino 1.8.13
YoutubeAPI : V2
ArduinoJson : 6.18.0
The text was updated successfully, but these errors were encountered: