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

error: 'pgm_read_ptr' was not declared in this scope #1536

Closed
Talkwondo opened this issue Apr 11, 2021 · 3 comments
Closed

error: 'pgm_read_ptr' was not declared in this scope #1536

Talkwondo opened this issue Apr 11, 2021 · 3 comments
Labels

Comments

@Talkwondo
Copy link

Hello,
I am trying to work with arduino cure due and get this weird error:

there are no arguments to 'pgm_read_ptr' that depend on a template parameter, so a declaration of 'pgm_read_ptr' must be available [-fpermissive]

return reinterpret_cast(pgm_read_ptr(p));
in the gmspace_generic.hpp

also,
error: 'pgm_read_ptr' was not declared in this scope

how to fix it?

thanks,

@bblanchon
Copy link
Owner

Hi @Talkwondo,

You can fix this error by defining ARDUINOJSON_ENABLE_PROGMEM to 0.

However, this error shouldn't happen in the first place.
This most likely comes from a missing macro in Arduino's headers.
What Arduino Core are you using?

Best Regards,
Benoit

@bblanchon bblanchon added the bug label Apr 11, 2021
@bblanchon bblanchon changed the title error 'pgm_read_ptr' argument error: 'pgm_read_ptr' was not declared in this scope Apr 11, 2021
@Talkwondo
Copy link
Author

Talkwondo commented Apr 11, 2021

I had a problem with the arduino core now i get the famous problem:
reinterpret_cast(pgm_read_ptr(p))
'const void*' is not a pointer-to-object type

@bblanchon
Copy link
Owner

'const void*' is not a pointer-to-object type

This is arduino/ArduinoCore-API#118

Which Arduino Core are you using? (what hardware if you prefer)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants