Library selection order?

Hi, I'm pretty new to arduino, but have coded for years. I have a sketch in the Create Editor that includes IRRemote.h. I uploaded a custom zip library and expect it to use that one when it compiles, but that doesn't seem to be the case. I find this in the log:

Multiple libraries were found for "IRremote.h"

Used: /home/admin/builder/arduino-builder/latest/IRremote-2.0.1

Not used: /tmp/187867183/custom/Arduino-IRremote-master

Not used: /home/admin/builder/arduino-builder/latest/Robot IR Remote-1.0.2

Shouldn't create be using the custom library first? How can I force it to? Am I just better off using the local thick client IDE? Thanks!

Hi wakitcha

Did you open the CUSTOM LIBRARY tab and use the INCLUDE from there to point it at the one you want it to use ?

A few people have also been reporting issues with IR libs on the regular IDE too so you may also want to check those out and see its it is a particular lib that is the cause.

Hi Ballscrewbob,
Thanks. Yes, I did use that include. It added the below, which is the same as for IRRemote except for the comment.

// Arduino-IRremote-master - Version: Latest
#include <IRremote.h>
#include <IRremoteInt.h>

Hi @wakitcha thank you for reporting this, yes custom libraries you manually add to the Custom tab by importing a .zip are the ones the builder reads first.

Also remember that the library should have the same name as the .h file, in this case you should remove the '-master'.

I would suggest you rename your library removing '-master', zip it, import it in the Custom tab, press the Include button from there.

Let me know if this helps and if you can use your library.

Yup, that worked. I extracted the zip, adjusted the name of the containing folders, and then re-zipped it. That file then was found and used when uploaded as a custom library.

It's interesting that it still found the custom library IRRemote.h, but only selected it first when the library name was identical. I expected any form of the library to supersede.

Are there plans to resolved this? Alternately, the above process works fine, but it would be nice to be able to nickname custom libraries to keep them straight.

There are some underlying rules in the builder (folder name = library name) so I totally agree this is cumbersome, but it is not like an easy frontend fix. I will keep you posted!