Adding OSC module to plug-in clashes with C+11?

I've been trying to solve this for a while and I know something is messed up with the project but maybe someone would have some idea that might help me what am I missing.

Once I'm just adding the new juce_osc module to my project and try to compile (Xcode 7.1 / 10.10.5) I get errors

"No member named 'forward' in namespace 'std' ' , so I guess this is related to some conflict of LLVM.

All the errors are in the juce_OSCMessage, juce_OSCSender headers.

When I do the same to the JuceDemoPlugin it works.

I've compared all the Introjucer settings but cannot see any difference between them.

Resolved (wrote too soon)

Seems that 10.6 or 10.7 as Deployment Target was causing that. need to check this further.

Update: only build 10.9 and above as Deployment Target compiles. so I guess without some rewriting it won't support older OS X versions?



If you want to compile the OSC module with deployment target OSX 10.8 or 10.7, then you have to explicitly specify libc++ to use for the C++ standard library. (You can do so in the Introjucer.) Then everything compiles fine. Apparently, if you have set the C++ standard library to "default", then Xcode will use libc++ for OSX 10.9 and higher but the older libstd++ for OSX 10.8 and lower (which doesn't have std::forward, hence the compiler error).

If you need to support 10.6, you need to disable C++11, in which case it will also compile. But then some of the OSC methods that work in C++11 only won't be available. Specifically, you won't be able to use the handy variadic template constructor for OSCMessage.

Thank You Timur,

That makes sense support 10.7 and above is reasonable enough those days (instead of rewriting the OSC messaging just for 10.6)

Yep, and also no rewriting is needed! The OSC module does support C++98, it will just lack a few member functions that will be #ifdef'd out.

When compiling, you basically just need to make sure that you are using the right combination of language standard (C++98 or C++11), standard library (libstdc++ is for C++98, libc++ is for C++11) and the deployment target (OSX 10.6 doesn't support C++11).

Having said that, why on earth would anyone need to support OSX 10.6 these days? ;-)

Regarding OS-X 10.6, the reason may be : "There is nothing they need in the new OS, so potential downtime for update isn't worth it.". (Quote from the KVR developer forum.)

Anyway, accommodating those stubborn end users stuck with such an outdated OS is a massive waste of time and effort.

I’m trying to implement the OSC module to an AAX enabled pluggin project, and I keep having issues no matter the deployment target. Any info about AAX and OSC module combatibility?

I’ve actually been able to build with OSC within a plug-in. (at least a few months ago was the last built I’ve made with it didn’t check latest tip).

The only missing link I’m now writing is a static OSC component to be used across all plug-ins since if each of your instances will use the OSC in listener mode you’ll need to have port for each one…
(also AAX worked)

Can you remember if you had any linker issues with the AAX target specifically?

@karolos Did you build AAX-libcpp? :wink:
I’m not sure if JUCE add our commit to Projucer use libcpp without renaming…

Thanks for the catch up! I updated the SDK today (after a year or so) :slight_smile: