Skip to content

Compilation error due to namespace FS in FS.h #7410

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
5 of 6 tasks
ESPboy-edu opened this issue Jun 28, 2020 · 0 comments · Fixed by #7413
Closed
5 of 6 tasks

Compilation error due to namespace FS in FS.h #7410

ESPboy-edu opened this issue Jun 28, 2020 · 0 comments · Fixed by #7413

Comments

@ESPboy-edu
Copy link

ESPboy-edu commented Jun 28, 2020

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [WeMos D1 mini]
  • Core Version: [2.7.1]
  • Development Env: [Arduino IDE]
  • Operating System: [MacOS]

Settings in IDE

  • Module: [Wemos D1 mini r2]
  • Flash Mode: [dio]
  • Flash Size: [4MB]
  • lwip Variant: [v2 Lower Memory]
  • Reset Method: [ck]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [160MHz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200] (serial upload only)

Problem Description

In some users, the compilation of https://github.com/ESPboy-edu/ESPboy_OTA causes an error
(different operating systems like windows 10, mac osx, ubuntu)

error messages
In file included from C:\Users\cheungbx\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:30:0,
                 from C:\Users\cheungbx\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266WiFi\src/WiFiClientSecure.h:41,
                 from C:\Users\cheungbx\Documents\Arduino\libraries\HTTPSRedirect/HTTPSRedirect.h:10,
                 from C:\Users\cheungbx\Documents\Arduino\libraries\ESPboy_Arduboy2_lib-master/ESPboyOTA.h:15,
                 from C:\Users\cheungbx\Documents\Arduino\test\test.ino:1:
C:\Users\cheungbx\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266WiFi\src/CertStoreBearSSL.h:40:23: error: 'FS' has not been declared
     int initCertStore(FS &fs, const char *indexFileName, const char *dataFileName);
                       ^
C:\Users\cheungbx\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266WiFi\src/CertStoreBearSSL.h:46:5: error: 'FS' does not name a type
     FS *_fs = nullptr;
     ^
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.

It seemed that FS class is declared in FS.h with namespace "namespace fs"
And in CertStoreBearSSL.h the FS is used without the noted namespace and CertStoreBearSSL.h does not see this declared FS class.
If will change the instances of FS in CertStoreBearSSL.h that are causing the errors to fs::FS (adding namespace), then it compiles OK.

MCVE Sketch

Debug Messages


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.

1 participant