Skip to content

Can't compile with "arduino nano every" #9652

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

Closed
ghost opened this issue Jan 22, 2020 · 1 comment
Closed

Can't compile with "arduino nano every" #9652

ghost opened this issue Jan 22, 2020 · 1 comment
Labels
Type: Duplicate Another item already exists for this topic

Comments

@ghost
Copy link

ghost commented Jan 22, 2020

OS version: Windows 10 build 1903
Arduino IDE version: 1.8.10
Arduino device: Nano Every

Hello,
the code below compiles well with an "arduino nano" but not with an "arduino nano every" :

const __FlashStringHelper *test()
{
  return F("Hello");
}
void setup() {}
void loop() {}

The result is :

In file included from sketch\bug.ino.cpp:1:0:

C:\Users\yo\Desktop\bug\bug.ino: In function 'const __FlashStringHelper* test()':

C:\Users\yo\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.5\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return

 #define F(str) (str)

                    ^

C:\Users\yo\Desktop\bug\bug.ino:4:10: note: in expansion of macro 'F'

   return F("Hello,");

          ^

exit status 1
Erreur de compilation pour la carte Arduino Nano Every
@per1234 per1234 added the Type: Duplicate Another item already exists for this topic label Jan 22, 2020
@per1234
Copy link
Collaborator

per1234 commented Jan 22, 2020

Closing as duplicate of arduino/ArduinoCore-megaavr#62

@per1234 per1234 closed this as completed Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

1 participant