Indexing error when using Eclipse Arduino plugin
eclipse give this error ../.ino.cpp:7:25: fatal error: ESP8266WiFi.h: No such file or directory
But all header file are not recognized (only Arduino.h).
I'm using eclipse 4.5 under ubuntu , arduino 1.6.4 compile sketch correctly.
But not advanced web server.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
have you load the ESP8266WiFi libary?


Ok it works , not so user friendly but wokrs.
Now remain a : Function 'snprintf' could not be resolved WebServices.ino /WebServices line 74
But i can use String object if i not found what it ask for
you need to include "stdio.h"
No , i have stdio.h , and semms only interface trouble i can compile and upload binary.

ok, you need do the include like:
extern "C" {
#include <stdio.h>
}
the snprintf is implemented in C not in CPP, you need to tell the compiler this or the function is not found.
https://github.com/esp8266/Arduino/blob/60efe5caed7b8d14636ae5bcc98a1052b55832b1/hardware/esp8266com/esp8266/cores/esp8266/libc_replacements.c#L77
I think stdio.h is smart enough to include #ifdef __cplusplus extern "C" { #endif guards, so that shouldn't be an issue.
Posting the full compiler output would certainly be helpful here.
On Wed, Jul 15, 2015 at 11:13 AM, Markus [email protected] wrote:
ok, you need do the include like:
extern "C" { #include <stdio.h> }
the snprintf is implemented in C not in CPP, you need to tell the compiler this or the function is not found.
https://github.com/esp8266/Arduino/blob/60efe5caed7b8d14636ae5bcc98a1052b55832b1/hardware/esp8266com/esp8266/cores/esp8266/libc_replacements.c#L77
— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/525#issuecomment-121525431.
It's not compilation issue , only eclipse interface say that snprintf could not be resolved.
now i get you problem, you mean this:
I simply ignore it at the moment, its a problem of the eclipse source indexing.
Arduino IDE is a fireworks and eclipse is the zar bomb (nuke bomb) for seriously programming , i will investigate about indexing , if you have a hint you are welcome.
I like your compere :+1: i think the problem comes from the many ifdef inside the stdio.h, based on where the indexer is started may some defines are not set and then the indexing ignore the snprintf be course its "ifdef out".
Has this issue been resolved? I'm having the same problem with the eclipse sloeber plugin.
Compiling a sample from pubsubclient library - mqtt_esp8266.ino:
snprintf (msg, 75, "hello world #%ld", value);
is not a sample problem; in the arduino ide this error does not occur.
Modifying to:
sprintf (msg, "hello world #% ld", value);
The error no longer occurs.
@far5893 @Links2004 this issue is ancient. Is it still valid?
Closing due to lack of feedback.