Undefined symbols for architecture i386:
“juce::repostCurrentNSEvent()”, referenced from:
JuceAUView::ComponentInHIView::keyPressed(juce::KeyPress const&) in juce_audio_plugin_client_AU_1.o
ld: symbol(s) not found for architecture i386
The thing is, repostCurrentNSEvent is defined in juce_mac_MessageManager.mm. If it’s missing, then the entire event handling system must also be missing!
It works when building a debug version, but not for release. I’d think this has something to do with stripping symbols but I’ve cycled through all Xcode strip settings, to no avail…
I get the same problem now that I attempted a release build with Juce 4.2 for the first time.
Undefined symbols for architecture i386:
“juce::repostCurrentNSEvent()”, referenced from:
JuceAUView::ComponentInHIView::keyPressed(juce::KeyPress const&) in juce_audio_plugin_client_AU_1.o
ld: symbol(s) not found for architecture i386
The problem is resolved by setting “Symbols hidden by Default” to NO for release builds. This and the other bug I encountered earlier with older SDKs makes me wonder about how much testing goes into major changes before they are pushed to JUCE git. It’s a bit worrysome as it looks like no real test builds are done while this could easily be automated.
This means the problem is that the method gets hidden during the release build. The true solution is to add attribute ((visibility(“default”))) or even better JUCE_API to line 360 of juce_mac_MessageManager.mm like so:
Hey, easy on the trolling there, of course we test things! But with a project like JUCE there are so many goddamned configurations that we can’t physically test everything, and a few problems will always slip through the net. This particular mistake would have been caught by the CI server that we didn’t have time to set-up before this release, but which we’ll definitely be adopting soon.
For the record, we’ve now fixed this, thanks for the heads-up, guys.
jenkins is your friend here. you should probably use it for regression testing asap. there are no other way to ensure big changes will not break everything again and again.