AU: compiler error with target 10.4 set (10.5 works)


#1

Hi together,

have an issue with the the latest tip. Get following compiler errors an mac OSX 10.5 with build Target 10.4 set:

error: invalid cast from type ‘juce::HeapBlock’ to Type ‘NSGlyph’ —> in juce_amalgamated.mm

#if SUPPORT_ONLY_10_4_FONTS HeapBlock <NSSize> advances (length); [nsFont getAdvancements: advances forGlyphs: (NSGlyph*) glyphs count: length]; // <<-- COMPILER ERROR

It compiles without any problem with target 10.5. Does someone know what the problem is?


#2

It seems also, that with the newest tip g.drawText(…) on OSX doesnt work as it does on windows. No text visible…

JUCE::Label seems to work… thats wired.


#3

I’ve got invisible fonts too. Try to add g.setFont call before drawText.


#4

I optimised some stuff that was spending a lot of time setting up a default font each time a graphics context was created, so that might be what tripped you up. I’ll fix it (they shouldn’t be invisible), but you should always set a font before drawing, as you don’t know what the default one will be.


#5

Thanks a lot. It works now :slight_smile:


#6

[quote=“patrickkunz”]Hi together,

have an issue with the the latest tip. Get following compiler errors an mac OSX 10.5 with build Target 10.4 set:

error: invalid cast from type ‘juce::HeapBlock’ to Type ‘NSGlyph’ —> in juce_amalgamated.mm

#if SUPPORT_ONLY_10_4_FONTS HeapBlock <NSSize> advances (length); [nsFont getAdvancements: advances forGlyphs: (NSGlyph*) glyphs count: length]; // <<-- COMPILER ERROR

It compiles without any problem with target 10.5. Does someone know what the problem is?[/quote]

I have the same error currently, have you found the solution?


#7

I’ve checked in a fix for that.