"cannot bind packed field" errors in XCode 3

Hello all,

I’m building JUCE 2.0 with XCode 3 (I know it’s old, but I can’t take the XCode 4 GUI), and get compiler errors in the file juce_PixelFormats.h. The error message is,

juce_PixelFormats.h:80: error: cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::.juce::PixelARGB::::components.juce::PixelARGB::Components::a’ to ‘juce::uint8&’

The line in question is,

forcedinline uint8& getAlpha() noexcept         { return components.a; }

Has anyone else seen this?

It only happens on the accessors that return a reference, and it happens even if I remove the packing directive from the components structure.

On the other hand, the HelloWorld demo compiles just fine if I comment out the 3 reference accessors…

…any reply appreciated…

stp in Santa Barbara

Ah, that’s a PPC build then. Thanks, it should be fixed now.

Mille grazie!

stp

Hello,

I’ve just upgraded my JUCE Version to 2.0.24, and I know get that error when I try to build projects that were fine before. Any ideas?

Thanks

It’s definitely fixed in the latest tip.

Hmm… What happened is that I’ve built JUCE to go from JUCE 2.0.21 to 2.0.24. Then I’ve tried to compile an old project that was fine just before. Now I get the following errors:

Cannot bind packed field ‘((juce::PixelARGB*)this)->juce::PixelARGB::.juce::PixelARGB::::components.juce::PixelARGB::Components::a’ to ‘juce::uint8&’

Once I’ve seen you telling me that those errors are supposed to be fixed, I’ve tried to run the IntroJucer again and now get the same errors for this project, + errors linked to overriding virtual methods.

Then I’ve realised that it must be because I’ve downloaded the new modules, but not the new projects version. So I’ve tried to use the GIT command but the connection is refused on this computer. Is there another way to get the complete JUCE 2.0.24?

Thank you again

Github lets you download the repo as a zip.

So I’ve downloaded the complete JUCE from: https://github.com/julianstorer/JUCE

and I still can’t run the IntroJucer due to:

  • the PixelARGB problem (cannot bind packed field)
  • ‘reduced(int)’ in ‘void Paint(Graphics& g)’ in “jucer_MiscUtilities.h”
  • Arguments of ‘void showUTF8ToolWindow(ScopedPointer& ownerPointer)’
  • ‘getInstance()’ in “jucer_Application.h”
  • Overriding “getMenuBarNames()” and “getMenuForIndex(int topLevelMenuIndex, const String& menuName)”

You’re mixing new and old code there. This is not a problem with anything in the repo, it’s your local copy that’s messed up.

Well I might not surprise you, but you were right