Using Platformio and include "AudioLibs/AudioKit.h" in multiple source files - solved #110
-
Thanks for the nice libraries using with Olimex ESP32-ADF. In a Platformio project using 'arduino-audiokit-hal' library, when the "AudioLibs/AudioKit.h" header are included in two source files, to access to Audiokit functions there is an Error in linking:
This tells that class SPI_VSPI is implemented twice: at 'arduino-audiokit-hal/src/audio_hal/common_defines.h:19:' in both source file, so I cannot use the header twice, but I want to access 'kit.volume(vol)' function in both sources. Trying What is the best way to include Audiokit in more than one source file ? mfg winfried |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I changed the definition to be static. |
Beta Was this translation helpful? Give feedback.
-
I am never using multiple translation units, so I can not guarantee that this is working for all optional components. If you find any further issues I suggest that you define the offending variable as static and submit a pull request... |
Beta Was this translation helpful? Give feedback.
I changed the definition to be static.
This should resolve your issue...