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

Thread: Libraries and directory structure between Arduino and Teensy

  1. #1
    Junior Member
    Join Date
    Jan 2019
    Posts
    12

    Libraries and directory structure between Arduino and Teensy

    Hi there,
    Yesterday I updated my version of the Arduino IDE from 1.8.7 to 1.8.9
    Surprise surprise, some of my Teensy sketches then failed to compile.
    The problems appear to be issues with the library .h files.
    I am working my way through these, but it is irritating to say the least, considering that I backed up the library
    before the upgrade and replaced them afterwards.
    I can understand the reason that the Teensy library files reside in a different directory structure, but
    I need both the Arduino library files and the Teensy library. When I attempt to compile certain sketches,
    the errors reported include using .h files from certain directories and not others.
    Question, is there any way to combine the library files to eliminate this problem?
    thanks in advance.
    John

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,852
    Sorry,

    I am not sure what you are asking? Would really help to actually have an idea of which library or libraries you are having issues with?

    The Arduino build process has a set of directories it looks for libraries in. If it finds that there are duplicate libraries there is an order in the directories it looks.

    That is for example on windows if you have the library, like: adafruit_gfx

    Which for example maybe Teensyduino installed into some place like: <arduino install folder>/hardware/teesny/avr/libraries/adafruit_gfx and
    you install another copy into your Arduino libraries folder: <Arduino sketches folder>/libraries/adafruit_gfx

    In most cases the system will use the one out of your sketches folder... There are always some caveats with this, about if the library has library properties, and the one in your library folder has architecture specified and it does not include avr...

    But again not much to go on...

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,166
    Quote Originally Posted by jwteensy View Post
    Question, is there any way to combine the library files to eliminate this problem?
    But what is "this problem"? Something we have no knowledge or visibility used to compile and no longer does. How are we supposed to help you without even knowing what it is?

  4. #4
    Junior Member
    Join Date
    Jan 2019
    Posts
    12
    Hello Paul and KurtE
    Thanks for the prompt reply.

    To explain perhaps more clearly,
    I have solved the compile problem myself because the sensor.h file (among others) was missing, probably deleted during the installation of the updated IDE.

    My query to you was regarding the directory structure. I have three Arduino libraries, one in my user folder, two in my c:\program files x86\Arduino folder
    one of which is in the hardware\Teensy\etc folder. I needed some advice from the forum regarding these directories because I do not know if removing them will cause other difficulties.

    The compile errors are as attached below:
    In file included from C:\ArduinoFiles19\JWSerialRX1Teensy35\JWSerialRX1T eensy35.ino:8:0:

    Multiple libraries were found for "Adafruit_BMP280.h"
    C:\Program Files (x86)\Arduino\libraries\Adafruit_BMP280/Adafruit_BMP280.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory

    Used: C:\Program Files (x86)\Arduino\libraries\Adafruit_BMP280
    compilation terminated.

    Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Adafru it-BME280
    Not used: C:\Program Files (x86)\Arduino\libraries\Adafruit-BME280
    Error compiling for board Teensy 3.5.

    Thanks again
    John



    In order to minimise the number of duplicated libraries

Posting Permissions

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