Hello folks,
I have started experimenting with Faust DSP objects for the Teensy Audio Library and came across some weird linker error. I already started an Github issue on the Faust Github website (https://github.com/grame-cncm/faust/issues/434) and the guy from Faust suggested that I might ask here on the Teensy forum.
Here is a minimal example to recreate the problem, which i also posted on the Github issue.
I have an .ino file called oscillators
then I have a .dsp file called triangle.dsp
and one called sawtooth.dsp
The Faust Audio Library Objects are created via the faust2teensy -lib command
And this is the compiler error in the Arduino IDE:
And as before, I have attached all the files (including the .h and .cpp files created by Faust) in a .zip folder.
Maybe someone who knows the Teensy linker can help me out with this problem.
Thanks in advance,
Flo
I have started experimenting with Faust DSP objects for the Teensy Audio Library and came across some weird linker error. I already started an Github issue on the Faust Github website (https://github.com/grame-cncm/faust/issues/434) and the guy from Faust suggested that I might ask here on the Teensy forum.
Here is a minimal example to recreate the problem, which i also posted on the Github issue.
I have an .ino file called oscillators
HTML:
#include <Audio.h>
#include "triangle.h"
#include "sawtooth.h"
void setup() {
}
void loop() {
}
then I have a .dsp file called triangle.dsp
HTML:
import("stdfaust.lib");
process = 200: os.triangle;
and one called sawtooth.dsp
HTML:
import("stdfaust.lib");
process = 200: os.sawtooth;
The Faust Audio Library Objects are created via the faust2teensy -lib command
And this is the compiler error in the Arduino IDE:
HTML:
/tmp/arduino_build_413038/sketch/triangle.cpp: In constructor 'triangle::triangle()':
triangle.cpp:5003: warning: operation on '((triangle*)this)->triangle::fDSP' may be undefined
triangle::triangle() : AudioStream((fDSP = new mydsp())->getNumInputs(), new audio_block_t*[fDSP->getNumInputs()])
^
/tmp/arduino_build_413038/sketch/sawtooth.cpp: In constructor 'sawtooth::sawtooth()':
sawtooth.cpp:4950: warning: operation on '((sawtooth*)this)->sawtooth::fDSP' may be undefined
sawtooth::sawtooth() : AudioStream((fDSP = new mydsp())->getNumInputs(), new audio_block_t*[fDSP->getNumInputs()])
^
/tmp/arduino_build_413038/sketch/triangle.cpp.o:(.bss.__exidx_end+0x0): multiple definition of `__exidx_end'
/tmp/arduino_build_413038/sketch/sawtooth.cpp.o:(.bss.__exidx_end+0x0): first defined here
/usr/share/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: Disabling relaxation: it will not work with multiple definitions
/tmp/arduino_build_413038/sketch/triangle.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider::_Alloc_hider(char*, std::allocator<char> const&)':
Multiple libraries were found for "SD.h"/tmp/arduino_build_413038/sketch/triangle.cpp:280: multiple definition of `__exidx_start'
/tmp/arduino_build_413038/sketch/sawtooth.cpp.o:/tmp/arduino_build_413038/sketch/sawtooth.cpp:285: first defined here
collect2: error: ld returned 1 exit status
Used: /usr/share/arduino/hardware/teensy/avr/libraries/SD
Not used: /usr/share/arduino/libraries/SD
Error compiling for board Teensy 4.0.
And as before, I have attached all the files (including the .h and .cpp files created by Faust) in a .zip folder.
Maybe someone who knows the Teensy linker can help me out with this problem.
Thanks in advance,
Flo
Attachments
Last edited: