Chowdhury-DSP / chowdsp_utils

JUCE module with utilities for ChowDSP
Other
236 stars 24 forks source link

Point is ambiguous error from Moodcamel on CMake juce project #533

Closed davispolito closed 5 months ago

davispolito commented 5 months ago
In file included from /Users/dp9443/Documents/Princeton/bitKlavier2/third_party/chowdsp_utils/modules/plugin/chowdsp_plugin_base/chowdsp_plugin_base.h:32:
In file included from /Users/dp9443/Documents/Princeton/bitKlavier2/third_party/chowdsp_utils/modules/plugin/chowdsp_plugin_state/chowdsp_plugin_state.h:36:
In file included from /Users/dp9443/Documents/Princeton/bitKlavier2/third_party/chowdsp_utils/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_ParameterListeners.h:12:
In file included from /Users/dp9443/Documents/Princeton/bitKlavier2/third_party/chowdsp_utils/modules/dsp/chowdsp_dsp_data_structures/chowdsp_dsp_data_structures.h:34:
In file included from /Users/dp9443/Documents/Princeton/bitKlavier2/third_party/chowdsp_utils/modules/dsp/chowdsp_dsp_data_structures/third_party/moodycamel/readerwriterqueue.h:53:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:54:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:80:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/MacTypes.h:542:16: error: reference to 'Point' is ambiguous
typedef struct Point                    Point;

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/MacTypes.h:538:8: note: candidate found by name lookup is 'Point'
struct Point {
       ^
/Users/dp9443/Documents/Princeton/bitKlavier2/JUCE/modules/juce_graphics/geometry/juce_Point.h:41:7: note: candidate found by name lookup is 'juce::Point'
class Point

when I try to use any of the chowdsp plugin base code it conflicts with the Juce::Point.

jatinchowdhury18 commented 5 months ago

Thanks for the report... would it be possible to share a (preferably small) example repository that has this issue? That would be very helpful for debugging.

I haven't run into this issue in the past myself... are you currently using the juce:: namespace in your project globally?

davispolito commented 5 months ago

I managed to fix it by using the JuceHeader.h instead of including any juce headers directly.

So I guess it comes down to managing include order.

If I find some time to reproduce the bug I'll post a repo here. I would like to come up with a way to not have to use JuceHeader.h because it just seems like overkill.