Is it possible to tell Arduino to put the cores/teensy3 includes AFTER the local library includes?
Or is this fixed?
Edit: To give the issue
I like to use functionality of latest CMSIS DSP library (copied lo local library) WITHOUT editing core's arm_math.h
Unfortunately Include sequence generated by Arduino places core before local libraries.
Only work around is to copy/duplicate arm_math.h and other DSP files in sketch file. I consider this not, let me say ideal!
Edit: In other words: Include order should be the same as link order!
After reading a little bit on the Web, I note that
"Arduino finds libraries based on .h names. It also prefers user installed libraries to arduino delivered libraries."
so what is really the problem
It is not Arduino, it is IMO Teensyduino generating the problem
I copy the error log (snippet)
Compiling sketch...
"C:\Users\Walter\Documents\arduino-1.8.2\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=136 -DARDUINO=10802 -DF_CPU=168000000 -DUSB_MIDI_AUDIO_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Users\Walter\Documents\arduino-1.8.2\hardware\teensy\avr\cores\teensy3" "-IC:\Users\Walter\Documents\Arduino\libraries\wmxzDSP\src" "C:\Users\Walter\AppData\Local\Temp\arduino_build_139169\sketch\test_include.ino.cpp" -o "C:\Users\Walter\AppData\Local\Temp\arduino_build_139169\sketch\test_include.ino.cpp.o"
In file included from C:\Users\Walter\Documents\Arduino\libraries\wmxzDSP\src/arm_const_structs.h:47:0,
from C:\Users\Walter\Documents\Arduino\test_include\test_include.ino:2:
C:\Users\Walter\Documents\Arduino\libraries\wmxzDSP\src/arm_common_tables.h:132:37: error: 'FAST_MATH_TABLE_SIZE' was not declared in this scope
extern const float32_t sinTable_f32[FAST_MATH_TABLE_SIZE + 1];
in particular the include search order is first
"-IC:\Users\Walter\Documents\arduino-1.8.2\hardware\teensy\avr\cores\teensy3"
followed by
"-IC:\Users\Walter\Documents\Arduino\libraries\wmxzDSP\src"
this fails the compilation as the arm_math.h in cores, which is found first, is an older and incompatible arm_math.h file.
needles to say, if I copy the wmxzDSP/arm_math.h etc. to sketch folder, there are no compilation errors due to local sketch precedence in include search
Suggest, that cores include is placed as last before system, providing include search order: sketch, local libraries, teensyduino libraries, cores, system includes