Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Forcing the Arduino IDE to use the right libraries?

  1. #1

    Forcing the Arduino IDE to use the right libraries?

    I am using the Arduino 1.8.1 IDE + the Teensyduino 1.35 on a WIN10 machine.

    Just got the Teensy3.5 and got over the basic of Blink / SD card Write read etc in no time. I love the Teensy !!

    Well then I said lets try a "big" code and landed on this : https://forum.pjrc.com/threads/42309...3-6-Datalogger

    Tried to compile it but the compile failed. Not sure if its because the IDE chose the libraries which are not Teensy based in some cases ? If so how to handle this situation and tell the compiler to use the Teensy versions selectively ? Or in other words how to enter full paths to libraries in # include pre-processor ??

    Or did the compile fail since it was meant for Teensy3.6 ? Sorry if the queries are basic - some hiccups on migration to a new MPU I guess !!

    I have attached the screen shot of the failed compile below :

    Multiple libraries were found for "TimeLib.h"
    Used: C:\Users\RRNathan\Documents\Arduino\libraries\Time
    Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Time
    Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Time
    Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Time
    Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Time
    Multiple libraries were found for "SPI.h"
    Used: C:\Users\RRNathan\Documents\Arduino\libraries\SPI
    Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI
    Multiple libraries were found for "SD.h"
    Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
    Not used: C:\Program Files (x86)\Arduino\libraries\SD
    Multiple libraries were found for "Wire.h"
    Used: C:\Users\RRNathan\Documents\Arduino\libraries\Wire
    Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Wire
    Using library SD at version 1.0.8 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
    Using library Wire at version 1.0 in folder: C:\Users\RRNathan\Documents\Arduino\libraries\Wire
    Using library Time at version 1.5 in folder: C:\Users\RRNathan\Documents\Arduino\libraries\Time
    Using library SPI at version 1.0 in folder: C:\Users\RRNathan\Documents\Arduino\libraries\SPI
    Error compiling for board Teensy 3.5.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,288
    This is a "feature" of Arduino. You can force Arduino to use your own copy of a library by putting into your sketchbook libraries folder, which by default is Documents\Arduino\libraries.

    Trouble is, when you put a copy of SPI, Time and Wire in there for some particular project, they will always get used even when you don't want them to be used for another project. The only solution is to move them out of that folder.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •