reference to <some effect> is Ambiguous #1253
-
I'd like to use AudioEffects and AudioSTK simultaneously, but it looks like both of these libraries are trying to define the same name (Delay). I'm not aware of any way to force the compiler to use the audioeffects library (instead of audiostk) in the constructor? Is there a workaround?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
That's why we have namespaces in c++: Just indicate the namespace that you want and you will be fine: |
Beta Was this translation helpful? Give feedback.
-
Arduino libraries (usually) do not use namespaces, which can lead to conflicts like this. As a way around this, I started to use namespaces in my libraries and I have added the "using namespace" (which is by default active) in the global include, though this is considered to be an antipattern in C++ programming. |
Beta Was this translation helpful? Give feedback.
That's why we have namespaces in c++: Just indicate the namespace that you want and you will be fine:
e.g. audio_tools::Delay dlay(1000, 0.5, 1.0, 44100);