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

ISO C++ forbids declaration of 'callback_Function' with no type [-fpermissive] 60 | (*callback_Function)(); #3

Open
mikepdiy opened this issue Nov 13, 2020 · 11 comments

Comments

@mikepdiy
Copy link

Hi there,

Awesome library and it compiles well for AVR boards for for SAMD (m0) boards gives an error .
I have tried to compile on:
Arduino 1.8.13
MacOS Catalina 10.15.7
Latest version of the library

Full error:
In file included from /var/folders/vw/gvtyfvy50bj0jkk29_hdnx9m0000gn/T/arduino_modified_sketch_77544/ReadAndWriteConfigFileExample.ino:20:
/Users/mike/Documents/Arduino/libraries/SDConfigCommand/src/SDConfigCommand.h:60:26: error: ISO C++ forbids declaration of 'callback_Function' with no type [-fpermissive]
60 | (*callback_Function)();
| ^
exit status 1
Error compiling for board Adafruit QT PY (SAMD21).

I am a novice so please tell me if there is something that I would have to change on my side.

@cygig
Copy link
Owner

cygig commented Nov 15, 2020

I am a novice as well, I don't have a M0 and I have no idea as well.

@mikepdiy
Copy link
Author

No worries :-). You can close the issue then :-D

@frittna
Copy link

frittna commented Apr 3, 2021

hi there, since i got exactly the same error while compiling this great app for a M5Stack Core-ESP32 in Arduino, i am wondering if someone knows the problem?
regards

@cygig
Copy link
Owner

cygig commented Apr 4, 2021

Again I'm not sure, but I have a feeling it has something to do with the fact that processCmd function is void. I have no idea how to do a C++ callback with non-void datatype.

Maybe you wanna try adding bool to the processCmd function and return a 1 at the end. I doubt it will work, but worth a shot. I am currently busy with my day job, thus unable to do much research on this issue.

@Akrai
Copy link

Akrai commented Apr 29, 2021

So i'm having the same issue, anybody solved it?

@mikepdiy
Copy link
Author

So i'm having the same issue, anybody solved it?

I actually ended up using another project that helped me to achieve a similar funationality .
You have a bit more work to do but maybe it helps. As an idea I am running this on an ATSAMD21E18 and it compiles nicely in Arduino IDE. The project mentioned is here .

@Akrai
Copy link

Akrai commented Apr 29, 2021

So i'm having the same issue, anybody solved it?

I actually ended up using another project that helped me to achieve a similar funationality .
You have a bit more work to do but maybe it helps. As an idea I am running this on an ATSAMD21E18 and it compiles nicely in Arduino IDE. The project mentioned is here .

I just saw the pending push request which fixes this issue, thanks anyway!

@cygig
Copy link
Owner

cygig commented Jul 11, 2021

I finally got the time to look into it, and from some Youtube videos, I realised I did not declare the datatype for the callback function. Strangely, it was allowed to run on my Pro Micro. I had since fixed it and I hope it works this time. So sorry.

@cygig
Copy link
Owner

cygig commented Jul 11, 2021

So i'm having the same issue, anybody solved it?

I actually ended up using another project that helped me to achieve a similar funationality .
You have a bit more work to do but maybe it helps. As an idea I am running this on an ATSAMD21E18 and it compiles nicely in Arduino IDE. The project mentioned is here .

I just saw the pending push request which fixes this issue, thanks anyway!

I feel so dumb, what exactly is a push request? I really suck at using github.

@Akrai
Copy link

Akrai commented Jul 11, 2021

So i'm having the same issue, anybody solved it?

I actually ended up using another project that helped me to achieve a similar funationality .
You have a bit more work to do but maybe it helps. As an idea I am running this on an ATSAMD21E18 and it compiles nicely in Arduino IDE. The project mentioned is here .

I just saw the pending push request which fixes this issue, thanks anyway!

I feel so dumb, what exactly is a push request? I really suck at using github.

Well, an open repository can receive commits from other people, and you can accept them to merge them into your code

Open pull requests to this project: https://github.com/cygig/SDConfigCommand/pulls

You can enter the commit and see the changes in the code: 36e8edd

You already fixed the code, so just close the commit or something

@cygig
Copy link
Owner

cygig commented Jul 11, 2021

So i'm having the same issue, anybody solved it?

I actually ended up using another project that helped me to achieve a similar funationality .
You have a bit more work to do but maybe it helps. As an idea I am running this on an ATSAMD21E18 and it compiles nicely in Arduino IDE. The project mentioned is here .

I just saw the pending push request which fixes this issue, thanks anyway!

I feel so dumb, what exactly is a push request? I really suck at using github.

Well, an open repository can receive commits from other people, and you can accept them to merge them into your code

Open pull requests to this project: https://github.com/cygig/SDConfigCommand/pulls

You can enter the commit and see the changes in the code: 36e8edd

You already fixed the code, so just close the commit or something

I see! Yea it seems like they did the same fix as me. Now let me figure out how to close the commit.

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