VFlib compiling problems on Mac OS


#1

I’ve successfully compiled the library on Win but got problems on mac
I have 20 errors

[quote]
/JuceLibraryCode/modules/vf_gui/components/vf_ComponentBroadcast.h:166:23: Reference to ‘Component’ is ambiguous
/JuceLibraryCode/modules/vf_gui/vf_gui.h:67:10: In file included from JuceLibraryCode/modules/vf_gui/vf_gui.h:67:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h:187:41: Candidate found by name lookup is ‘Component’
/JuceLibraryCode/modules/juce_gui_basics/positioning/juce_RelativeRectangle.h:30:7: Candidate found by name lookup is ‘juce::Component’[/quote]

here

[code]template
componentBroadcast (Component* c, void (C::*f)())
{ call (c, vf::bind (f, vf::_1)); }

template <class C, class T1>
componentBroadcast (Component* c, void (C::*f)(T1), T1 t1)
{ call (c, vf::bind (f, vf::_1, t1)); }

template <class C, class T1, class T2>
componentBroadcast (Component* c, void (C::*f)(T1, T2), T1 t1, T2 t2)
{ call (c, vf::bind (f, vf::_1, t1, t2)); }

template <class C, class T1, class T2, class T3>
componentBroadcast (Component* c, void (C::*f)(T1, T2, T3), T1 t1, T2 t2, T3 t3)
{ call (c, vf::bind (f, vf::_1, t1, t2, t3)); }

template <class C, class T1, class T2, class T3, class T4>
componentBroadcast (Component* c, void (C::*f)(T1, T2, T3, T4), T1 t1, T2 t2, T3 t3, T4 t4)
{ call (c, vf::bind (f, vf::_1, t1, t2, t3, t4)); }

template <class C, class T1, class T2, class T3, class T4, class T5>
componentBroadcast (Component* c, void (C::*f)(T1, T2, T3, T4, T5), T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
{ call (c, vf::bind (f, vf::_1, t1, t2, t3, t4, t5)); }

template <class C, class T1, class T2, class T3, class T4, class T5, class T6>
componentBroadcast (Component* c, void (C::*f)(T1, T2, T3, T4, T5, T6),
T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
{ call (c, vf::bind (f, vf::_1, t1, t2, t3, t4, t5, t6)); }

template <class C, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
componentBroadcast (Component* c, void (C::*f)(T1, T2, T3, T4, T5, T6, T7),
T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
{ call (c, vf::bind (f, vf::_1, t1, t2, t3, t4, t5, t6, t7)); }

template <class C, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
componentBroadcast (Component* c, void (C::f)(T1, T2, T3, T4, T5, T6, T7, T8),
T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
{ call (c, vf::bind (f, vf::_1, t1, t2, t3, t4, t5, t6, t7, t8)); }
/
* @} */

private:
template <class Interface, class Functor>
void call (Component* component, Functor const& f)
{
Interface* const object = dynamic_cast <Interface*> (component);

if (object != nullptr)
  f (object);

for (int i = 0; i < component->getNumChildComponents (); ++i)
  call <Interface> (component->getChildComponent (i), f);

}
[/code]
Update:
To fix it just add juce:: before every Component. For example


#2

Probably a conflict with how you’ve included Quicktime.