Skip to content

ESP8266: unknown type name 'time_t' time_t tv_sec; #851

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
ghislainborremans opened this issue Oct 19, 2017 · 5 comments
Closed

ESP8266: unknown type name 'time_t' time_t tv_sec; #851

ghislainborremans opened this issue Oct 19, 2017 · 5 comments
Labels
domain: build The build does not work as the Arduino IDE. importance: usability OS: all status: known limitation This is soimething we can live with status: workaround documented A workaround has been confirmed to solve this issue.

Comments

@ghislainborremans
Copy link

When compiling the FSBrowserNG UserConfigExample.ino i get the following error.
it looks as it refers to the time.c file un under the core library under Sloeber.

D:\sloeber\arduinoPlugin\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\time.c:26:3: error: unknown type name 'time_t'
time_t tv_sec;

Thanks in advance for the help.

@jantje
Copy link
Member

jantje commented Oct 19, 2017

check your cdt indexer options #825
Check the libraries Sloeber has added.
Know that the nightly auto installs libraries which (combined with the cdt explorative options) may lead to unwanted included libraries in your project.

@ghislainborremans
Copy link
Author

I have updated the indexer options as indicated but n success.
I do not see extra libraries neither ?

@jantje
Copy link
Member

jantje commented Oct 19, 2017

After having changed the indexer options you need to delete all the libraries in the libraries folder of the project so sloeber will import them again (hopefully this time the good ones).
If the problem persists after this, check whether Sloeber imported the good libraries

@ghislainborremans
Copy link
Author

Hello,
the procedure above works.

The error is due to the fact that for the FSBrowserNG library it is necessary to copy the "time.h" file to "_time.h" in order to call the "#include <_time.h> " statement from WebHandlerImpl.h ( see explanation in Troubleshooting section at https://github.com/gmag11/FSBrowserNG. This is needed because the project also uses Time.h (Timelib.h ).

It is important that you change the "#include time.h" to "#include _time.h" also in "time.c" file as well. this solved the issue.

The files "time.c" and "time.h" are located in the Sloeber/Arduino plugin folder ( ".\sloeber\arduinoPlugin\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include" and not in the Arduino1.5 folder as mentioned in Troubleshooting section at https://github.com/gmag11/FSBrowserNG..

@jantje jantje added domain: build The build does not work as the Arduino IDE. importance: usability OS: all status: known limitation This is soimething we can live with status: workaround documented A workaround has been confirmed to solve this issue. labels Oct 20, 2017
@jantje
Copy link
Member

jantje commented Oct 20, 2017

:-) I thought it would be something like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: build The build does not work as the Arduino IDE. importance: usability OS: all status: known limitation This is soimething we can live with status: workaround documented A workaround has been confirmed to solve this issue.
Projects
None yet
Development

No branches or pull requests

2 participants