Compiling Audio library

Status
Not open for further replies.
Hello everyone! I have a question about compiling the Audio library. I am working on a project that includes some Audio code. When I compile this portion of the Audio library, I get the error below:

Code:
$ arm-none-eabi-g++ -Wall -g -Os -mthumb -ffunction-sections -fdata-sections -nostdlib -MMD -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DTEENSYDUINO=124 -DF_CPU=48000000 -Isrc -Iteensy3 -D__MK20DX256__ -mcpu=cortex-m4 -DUSING_MAKEFILE -std=gnu++0x -felide-constructors -fno-exceptions -fno-rtti  -Ilibraries/SD/  -Ilibraries/Audio/  -Ilibraries/Wire/  -Ilibraries/SPI/  -Ilibraries/SerialFlash/ -o "libraries/Audio/control_ak4558.o" -c "libraries/Audio/control_ak4558.cpp"

In file included from libraries/Wire/Wire.h:26:0,
                 from libraries/Audio/control_ak4558.cpp:10:
libraries/Wire/WireKinetis.h: In constructor 'constexpr TwoWire::TwoWire(uintptr_t, const TwoWire::I2C_Hardware_t&)':
libraries/Wire/WireKinetis.h:95:46: error: call to non-constexpr function 'Stream::Stream()'
   : port_addr(port_addr), hardware(myhardware) {
                                              ^

I seem to get this error both with the Audio library as included in the Teensyduino installation, as well as with the Audio library downloaded directly from PaulStoffregen github.

Any idea what I am doing wrong?
Many thanks in advance!
 
Maybe a very old version of the Wire library.

Download Arduino 1.8.5 and Teensyduino 1.42. Run the installer. Then use Arduino to compile the code. Arduino is the only "officially" supported way to build the code. You can use File > Preferences in Arduino to show verbose messages while compiling. That will give you the exact commands Arduino runs to compile the code.
 
Following post #2 installs - make sure there is no copy of WIRE in sketchbook\library folder. The source will show in verbose compile console window and it should show a single "Wire" library used from Teensy directory.

Assuming 'windows' install it will show like this from "Arduino..." install location: Using library Wire at version 1.0 in folder: T:\Arduino...\hardware\teensy\avr\libraries\Wire
 
Hello both, thank you so much for replying. You were right, it was an old version, but I believe it wasn't the Wire library that was old but the Teensy core that I used. Once I re-did the compilation against the cores/teensy3 from Stoffregen's github then it worked.

I now run into a linking problem, but before bothering you with that, it seems the following is the more relevant question.

You remarked that the only supported way to build is using Arduino. This makes me wonder if I am approaching this in the wrong way. I want to adjust some parameter in the Teensy core (the audio buffer size). So this is why I am trying to set up a copy of all the libraries, and then use a custom Makefile, because I didn't want to touch my original Arduino/Teensyduino installation. Is that the way to go or is there a better, recommended way when you want to make changes to the Teensy core?
 
Status
Not open for further replies.
Back
Top