Complie Error "No such file or directory"

now i download a library,then i imported it,but it cannot complied successfully,the error is “No such file or directory”.but the file needed is not the project’s file at all!!!it is not included in. it just a file that another project compiled OK.(like the red word maked below)
I tryed make a fold and put these files in the libraries,it has the same result.what’s wrong?how to fix the compile issue?

Compile info:

Arduino: 1.0.6 (Windows NT (unknown)), Board: “Arduino Mega 2560 or Mega ADK”
D:\arduino\arduino-1.0.6\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -ID:\arduino\arduino-1.0.6\hardware\arduino\cores\arduino -ID:\arduino\arduino-1.0.6\hardware\arduino\variants\mega -ID:\arduino\arduino-1.0.6\libraries\XTech -ID:\arduino\arduino-1.0.6\libraries\ESP8266 -ID:\arduino\arduino-1.0.6\libraries\SoftwareSerial D:\arduino\arduino-1.0.6\hexbuild\ESP8266.cpp -o D:\arduino\arduino-1.0.6\hexbuild\ESP8266.cpp.o

ESP8266.ino: In function ‘int dataCallback(char*)’:
ESP8266.ino:28: warning: no return statement in function returning non-void
ESP8266.ino: In function ‘void setup()’:
ESP8266.ino:66: warning: only initialized variables can be placed into program memory area
ESP8266.ino:67: warning: only initialized variables can be placed into program memory area
ESP8266.ino:68: warning: only initialized variables can be placed into program memory area
ESP8266.ino:79: warning: only initialized variables can be placed into program memory area
ESP8266.ino:80: warning: only initialized variables can be placed into program memory area
ESP8266.ino:88: warning: only initialized variables can be placed into program memory area
ESP8266.ino:93: warning: only initialized variables can be placed into program memory area
ESP8266.ino:98: warning: only initialized variables can be placed into program memory area
ESP8266.ino:103: warning: only initialized variables can be placed into program memory area
ESP8266.ino: In function ‘bool processSerialCommand()’:
ESP8266.ino:171: warning: comparison between signed and unsigned integer expressions
ESP8266.ino: In function ‘int dataCallback(char*)’:
ESP8266.ino:28: warning: control reaches end of non-void function
Using previously compiled: D:\arduino\arduino-1.0.6\hexbuild\XTech\DS3231.cpp.o

Using previously compiled: D:\arduino\arduino-1.0.6\hexbuild\XTech\EEPROM.cpp.o

D:\arduino\arduino-1.0.6\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -ID:\arduino\arduino-1.0.6\hardware\arduino\cores\arduino -ID:\arduino\arduino-1.0.6\hardware\arduino\variants\mega -ID:\arduino\arduino-1.0.6\libraries\XTech -ID:\arduino\arduino-1.0.6\libraries\ESP8266 -ID:\arduino\arduino-1.0.6\libraries\SoftwareSerial -ID:\arduino\arduino-1.0.6\libraries\XTech\utility D:\arduino\arduino-1.0.6\libraries\XTech\html.cpp -o D:\arduino\arduino-1.0.6\hexbuild\XTech\html.cpp.o

D:\arduino\arduino-1.0.6\libraries\XTech\html.cpp:1:22: error: Ethernet.h: No such file or directory
D:\arduino\arduino-1.0.6\libraries\XTech\html.cpp:2:25: error: EthernetUdp.h: No such file or directory
D:\arduino\arduino-1.0.6\libraries\XTech\html.cpp:4: error: variable or field ‘print_html’ declared void
D:\arduino\arduino-1.0.6\libraries\XTech\html.cpp:4: error: ‘EthernetClient’ was not declared in this scope

compile1.JPG

xxx\arduino-1.0.6\libraries\ESP8266 │ EEPROMAnything.h │ ESP8266.cpp │ ESP8266.h │ README.md │ └─ESP8266 ESP8266.ino

Do you have the ethernet library on path?

now i download a library

What library?

D:\arduino\arduino-1.0.6\libraries\XTech\html.cpp:1:22: error: Ethernet.h: No such file or directory

You seem to have forgotten to share your code, even though the stickies that you were supposed to read BEFORE posting here told you too. Especially this file!

econjack:
Do you have the ethernet library on path?

the question is i havn’t use any ethernet library at all. The “XTech” folder is another project of mine.the current library folder is “ESP8266”.

Why are you trying to use the ethernet library? The ESP8266 doesn't use it.

Why are you using IDE V1.0.6? That is an old release.

PaulS:
What library?
You seem to have forgotten to share your code, even though the stickies that you were supposed to read BEFORE posting here told you too. Especially this file!

the downloaded library link: GitHub - ssokol/esp8266: ESP8266 Wifi library and sample code for Arduino

i checked the include files, the file of compiler report it’s nothing to do with the ESP8266 library.all the files i have listed above.

here is the include codes:

In ESP8266.h:

#include <Arduino.h> ?// for type definitions

#ifndef ESP8266_h
#define ESP8266_h

#include <SoftwareSerial.h>

In ESP8266.cpp:

#include “Arduino.h”
#include “ESP8266.h”

In EEPROMAnything.h:

#include <EEPROM.h>
#include <Arduino.h> ?// for type definitions

In ESP8266.ino:

//#include <AltSoftSerial.h>
#include “SoftwareSerial.h”
#include <EEPROM.h>
#include “EEPROMAnything.h”
#include “ESP8266.h”

Nothing in your latest post suggests WHY you are compiling the XTech library.

PaulS: Nothing in your latest post suggests WHY you are compiling the XTech library.

that's also what i confuesd! i donot want to compile the XTech library,but the compiler does!!!! i just want to compile the ESP8266 library,its a standalone library. all the needed file i had listed above,why the compiler go back to deal with another library?

SurferTim: Why are you trying to use the ethernet library? The ESP8266 doesn't use it.

Why are you using IDE V1.0.6? That is an old release.

yap,i really not use anyother library in this project,the ESP8266 didn't need.

i has build a project with the IDE 1.0.6,which is the latest version at that time.i had made some changes to the core library.recently i start another project,i want to inherit the feature of it.if i change to another version,it need some time to do the compatible coding.also,the IDE is updating all the time,select a suitable one more then the latest one,i think.

I'm sure that at some point, you'll actually post your code. Until then, I'm done.

can i give a link: GitHub - ssokol/esp8266: ESP8266 Wifi library and sample code for Arduino? the code is too long,and their is no place to upload a attachment.

//#include <AltSoftSerial.h>
#include “SoftwareSerial.h”

// DO NOT try to use the default SoftSerial it WILL NOT work
//AltSoftSerial softSerial;
SoftwareSerial softSerial(3,4);

above is what i changed!!! Ths SoftwareSerial is a standard library in ardunio 1.0.6,and in the ESP8266 project, this part is compiled ok. we just talk about the compile issue,not whether the library can work on board or not.

and their is no place to upload a attachment.

You still haven't read the stickies, I see. There IS a way to attach your code HERE.

even if i download AltSoftSerial library(PaulS provide), i didn't change anything of the ESP8266 library, the compiler tell me a same error as i use SoftwareSerial did.

even if i download AltSoftSerial library(PaulS provide), i didn't change anything of the ESP8266 library, the compiler tell me a same error as i use SoftwareSerial did.

So? See reply #s 10 and 12.

sorry, i found the place to upload an attachment.

esp8266-master.zip (12.1 KB)

After downloading your zip file, and AltSoftSerial, when I compile, using 1.6.5, I get:

Sketch uses 11,820 bytes (4%) of program storage space. Maximum is 253,952 bytes. Global variables use 1,318 bytes (16%) of dynamic memory, leaving 6,874 bytes for local variables. Maximum is 8,192 bytes.

PaulS: After downloading your zip file, and AltSoftSerial, when I compile, using 1.6.5, I get:

shit,i use 1.6.9 compiled OK.why? it depends on IDE version?

After downloading 1.6.9, I get:

sketch\ESP8266.cpp: In member function 'int ESP8266::initializeWifi(DataCallback, ConnectCallback)':

sketch\ESP8266.cpp:75:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if(!searchResults("OK", 1000, _debugLevel)) {

^

sketch\ESP8266.cpp:84:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if(!searchResults("Ready", 5000, _debugLevel)) {

^

sketch\ESP8266.cpp: In member function 'int ESP8266::connectWifi(char*, char*)':

sketch\ESP8266.cpp:113:45: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if(!searchResults("OK", 30000, _debugLevel)) {

^

sketch\ESP8266.cpp: In member function 'void ESP8266::run()':

sketch\ESP8266.cpp:196:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char *line1 = "{\"event\": \"beacon\", \"ip\": \"";

^

sketch\ESP8266.cpp:197:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char *line3 = "\", \"port\": ";

^

sketch\ESP8266.cpp:198:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char *line5 = ", \"device\": \"";

^

sketch\ESP8266.cpp:199:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char *line7 = "\"}\r\n";

^

sketch\ESP8266.cpp: In member function 'bool ESP8266::startServer(int, long int)':

sketch\ESP8266.cpp:229:43: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if(!searchResults("OK", 500, _debugLevel)){

^

sketch\ESP8266.cpp:236:43: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if(!searchResults("OK", 500, _debugLevel)) {

^

sketch\ESP8266.cpp: In member function 'bool ESP8266::startClient(char*, int, long int)':

sketch\ESP8266.cpp:253:47: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if(!searchResults("OK", timeout, _debugLevel)) {

^

sketch\ESP8266.cpp: In member function 'int ESP8266::scan(char*, int)':

sketch\ESP8266.cpp:275:39: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

debug("maximum lenthg of buffer: ");

^

sketch\ESP8266.cpp: In member function 'bool ESP8266::sendData(int, char*)':

sketch\ESP8266.cpp:361:39: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

searchResults("OK", 500, _debugLevel);

^

sketch\ESP8266.cpp: In member function 'bool ESP8266::setLinkMode(int)':

sketch\ESP8266.cpp:370:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if(!searchResults("OK", 1000, _debugLevel)){

^

sketch\ESP8266.cpp: In member function 'bool ESP8266::startUDPChannel(int, char*, int)':

sketch\ESP8266.cpp:383:43: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if(!searchResults("OK", 500, _debugLevel)) {

^

sketch\ESP8266.cpp: In member function 'bool ESP8266::searchResults(char*, long int, int)':

sketch\ESP8266.cpp:502:30: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

debug("Failed: No data");

^

sketch\ESP8266.cpp:504:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

debug("Failed");

^

Sketch uses 11,458 bytes (37%) of program storage space. Maximum is 30,720 bytes. Global variables use 1,318 bytes (64%) of dynamic memory, leaving 730 bytes for local variables. Maximum is 2,048 bytes.

Notice that there are just warnings (that could be dealt with).

why you got so many warning? i complile finished with no warning. becasue of the compile envoriment of the machine?