Question

I am getting the following error when I compile qt 4.8.6 source on Mac OS X version 10.8.5.

It looks like some platform related flags are not enabled.

In file included from text/qfontengine_coretext.mm:42:
text/qfontengine_coretext_p.h:64: error: expected `)' before‘font’
text/qfontengine_coretext_p.h:65: error: expected `)' before‘font’
text/qfontengine_coretext_p.h:93: error: ‘CGContextRef’ has not
been declared
text/qfontengine_coretext_p.h:111: error: ‘CTFontRef’ does not 
name a type
text/qfontengine_coretext_p.h:112: error: ‘CGFontRef’ does not
name a type
text/qfontengine_coretext_p.h:114: error: ‘CGAffineTransform’ does 
not name a type
text/qfontengine_coretext_p.h:122: error: expected ‘,’ or ‘...’
before ‘&’ token
text/qfontengine_coretext_p.h:122: error: ISO C++ forbids
declaration of ‘QCFString’ with no type
text/qfontengine_coretext_p.h:123: error: expected `)' before
‘ctFontRef’
text/qfontengine_coretext_p.h:134: error: ‘CTFontRef’ does not
name a type
text/qfontengine_coretext_p.h:144: error: ‘CTFontRef’ has not been
declared
text/qfontengine_coretext_p.h:145: error: ‘CTFontRef’ does not
name a type
text/qfontengine_coretext_p.h:146: error: ISO C++ forbids
declaration of ‘QCFType’ with no type
text/qfontengine_coretext_p.h:146: error: expected ‘;’ before ‘<’
token
text/qfontengine_coretext_p.h:147: error: ‘CGAffineTransform’ does
not name a type
text/qfontengine_coretext_p.h:152: error: ‘CGAffineTransform’ does
not name a type
text/qfontengine_coretext.mm:53: error: ‘acosf’ was not declared 
in this scope
text/qfontengine_coretext.mm:53: error: ‘tanf’ was not declared in 
this scope
text/qfontengine_coretext.mm:55: error: variable or field 
‘loadAdvancesForGlyphs’ declared void
text/qfontengine_coretext.mm:55: error: ‘CTFontRef’ was not 
declared in this scope
text/qfontengine_coretext.mm:56: error: ‘CGGlyph’ was not declared    
in this scope
text/qfontengine_coretext.mm:56: error: template argument 1 is 
invalid
text/qfontengine_coretext.mm:56: error: ‘cgGlyphs’ was not 
declared in this scope
text/qfontengine_coretext.mm:57: error: expected primary-
expression before ‘*’ token
text/qfontengine_coretext.mm:57: error: ‘glyphs’ was not declared 
in this scope
text/qfontengine_coretext.mm:57: error: expected primary-
expression before ‘int’
text/qfontengine_coretext.mm:58: error: expected primary-
expression before ‘flags’
text/qfontengine_coretext.mm:59: error: expected primary-
expression before ‘const’
text/qfontengine_coretext.mm:53: warning: ‘SYNTHETIC_ITALIC_SKEW’ 
defined but not used
make[2]: *** [.obj/debug-shared/qfontengine_coretext.o] Error 1
make[1]: *** [debug] Error 2
make: *** [sub-gui-make_default-ordered] Error 2

Am i missing anything? The configuration command used is:

./configure -debug -opensource -confirm-license -arch "x86_64" -cocoa -qpa

and I have Xcode Mac base SDKs for 10.7 and 10.8.

Was it helpful?

Solution

QPA is Qt platform abstraction, wherein you can develop your own plugin for embedded systems. It basically replaces the platform port.

QPA is well developed in QT5, maybe you can consider using it. You need to resolve these compilation issues on your own and if you are planning on how to use QPA, minimal plugin is the best choice.

You can resolve these issues, basically by including ApplicationService framework and header. Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top