Libraries and directory structure between Arduino and Teensy

Status
Not open for further replies.

jwteensy

Member
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
 
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...
 
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?
 
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\JWSerialRX1Teensy35.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\Adafruit-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
 
Status
Not open for further replies.
Back
Top