Using Audio and the new Wire library causes duplicate symbol linker errors

Status
Not open for further replies.

jwatte

Well-known member
The Audio library apparently includes the old Wire library, which causes duplicate symbol definitions if I want to use the new (asynchronous) Wire library and Audio in the same project.
Any good ideas for how to fix this other than doing surgery on the Audio.h and related headers?
 
I ended up finding the files that #include <Wire.h> in the Audio/ library, and renaming them to not include them in the build.
As they are all just codec support for codecs I don't use, this was good enough for now, although each time I install Teensyduino, I will have to re-apply this patch.
 
I had this problem too. I tried doing what you describe, but instead just commented them out, but for some reason it was still happening.

In the end, I removed the Wire.h file itself and replaced it with one that simply includes i2c_t3.h instead.
 
Why not just put a blank Wire.h file in the library folder, the library would load the blank rather than the core version and you could still use i2c_t3 with an additional #include line mod in the library
 
Status
Not open for further replies.
Back
Top