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

ScreenOLED_SSD1306 sample fails to build #2256

Closed
etmmahi opened this issue Mar 10, 2021 · 4 comments · Fixed by #2259
Closed

ScreenOLED_SSD1306 sample fails to build #2256

etmmahi opened this issue Mar 10, 2021 · 4 comments · Fixed by #2259

Comments

@etmmahi
Copy link
Contributor

etmmahi commented Mar 10, 2021

Hi guys,

I just tried to build the sample ScreenOLED_SSD1306 from the develop branch.
It fails at:

.../Sming/Sming/Libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp: In member function 'void Adafruit_SSD1306::drawFastHLineInternal(int16_t, int16_t, int16_t, uint16_t)':
.../Sming/Sming/Libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp:635:21: error: ISO C++17 does not allow 'register' storage class specifier [-Werror=register]
  635 |   register uint8_t *pBuf = buffer;

It seems the patch for the Adafruit_SSD1306 Library needs to be upgraded to remove all the register keywords.
This change needs to be backported to the lts versions.

Best
Martijn

@mikee47
Copy link
Contributor

mikee47 commented Mar 10, 2021

Yes, probably needs fixing. You can build the sample with make STRICT=1 and the errors will be converted to warnings.

@etmmahi
Copy link
Contributor Author

etmmahi commented Mar 10, 2021

The STRICT=1 makes compilation work again.

However fix is still needed. When I remove all the 'register' keywords, the code also compiles without problems/warnings

@slaff
Copy link
Contributor

slaff commented Mar 10, 2021

@etmmahi If you want create a PR with the latest Adafruit_SSD1306 library version and updated sample.

etmmahi added a commit to etmmahi/Sming that referenced this issue Mar 10, 2021
@etmmahi
Copy link
Contributor Author

etmmahi commented Mar 10, 2021

With PR #2259 the sample application ScreenOLED_SSD1306 builds without any issues. pse merge

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

Successfully merging a pull request may close this issue.

3 participants