compile error with Paul Stoffregen's new Ethernet library

I've been trying to compile just a simple example from Paul Stoffregen's new ethernet library with the ESP8266, and I'm having trouble. I copied and pasted the library into a few places:

  1. Documents/library
  2. C:\Program Files (x86)
  3. That weird %Apps/ESP8266 folder

I can see which Ethernet library it's using from the compile message "multiple libraries found, using...", so I make sure to remove the old Ethernet library and put in the new one there. But I keep getting compile error on this line:

Ethernet.init(15);  // ESP8266 with Adafruit Featherwing Ethernet

The old library didn't have an init function, but the new one does.

The error saids that there's no function .init in EthernetClass. So I think Arduino isn't using the correct library, even though I specifically deleted and replace the Ethernet library in where it saids it's using for compile.

I'm pretty ignorant about how the Arduino IDE handles libraries. There seems to be libraries scattered about. Is there a trick to using the correct library? Can you be more specific with the include statement?

EricExperiment:
I can see which Ethernet library it’s using from the compile message “multiple libraries found, using…”, so I make sure to remove the old Ethernet library and put in the new one there.

You can see that, but I can’t because you left the useful part of the message out.

EricExperiment:
But I keep getting compile error on this line:

When you encounter an error you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar).

EricExperiment:
So I think Arduino isn’t using the correct library

I’d tend to agree but you left out all the information that would make that more than a guess.

EricExperiment:
I’m pretty ignorant about how the Arduino IDE handles libraries. There seems to be libraries scattered about.

There are 3 locations for library files:

  • Sketchbook: {sketchbook folder}/libraries. The sketchbook folder location can be found (or changed) at File > Preferences > Sketchbook location:. This is the location of libraries installed via Library Manager (Sketch > Include Library > Manage Libraries…) or Sketch > Include Library > Add .ZIP Library. You should also manually install libraries to that location.
  • IDE: {Arduino IDE install folder}/libraries. This is for the libraries included with the Arduino IDE installation. You should never install libraries to that folder because they will be lost when you update to a new IDE version.
  • Core: This is dependent on the current selection in Tools > Board. Location will depend on if you’re using a hardware core bundled with the IDE, installed via Boards Manager, or manually installed to {sketchbook folder}/hardware.

EricExperiment:
Is there a trick to using the correct library?

Yes, but I’ll wait for the more information so I can provide more detailedinstructions.

EricExperiment:
Can you be more specific with the include statement?

Yes, you can specify the absolute path, but that shouldn’t be necessary. It makes your code non-portable so it should be avoided if possible.

did you install or update the library with Library Manager?