Which Ethernet library does the compiler pick when Arduino and Teensy have their own?

Status
Not open for further replies.

jimmie

Well-known member
This is a very basic question but I never ran into this problem because I am new to Teensy. I did an internet search but this time too much information on this topic was not helpful!

Arduino has its Ethernet library (for example). Teensy also has its own Ethernet library with the same name.

How does the compiler know which one to use?

Thanks in advance.
 
I think the order is the first one it finds starting with:
Your sketch folder, you can put library .h and .c here to make sure they are the ones used.
Sketchbook/Library/
if not found then
Teensy library for the board your compiling for (on Mac its in: Macintosh HD⁩ ▸ ⁨Applications⁩ ▸ ⁨Arduino⁩ ▸ ⁨Contents⁩ ▸ ⁨Java⁩ ▸ ⁨hardware⁩ ▸ ⁨teensy⁩ ▸ ⁨avr⁩ ▸ ⁨libraries⁩)
if not then the Arduino

You can tell in the bottom window which library it picked and which ones it skipped.
 
Last edited:
Status
Not open for further replies.
Back
Top