首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用QT4.8.6编译发出问题,并配置了qpa。

使用QT4.8.6编译发出问题,并配置了qpa。
EN

Stack Overflow用户
提问于 2014-02-28 17:18:46
回答 1查看 278关注 0票数 1

在Mac版本10.8.5上编译qt 4.8.6源代码时,我会得到以下错误。

看起来某些与平台相关的标志没有启用。

代码语言:javascript
复制
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

我有遗漏什么吗?所使用的配置命令是:

代码语言:javascript
复制
./configure -debug -opensource -confirm-license -arch "x86_64" -cocoa -qpa

我有10.7和10.8的Xcode Mac基础SDK。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-03-03 13:36:01

QPA是Qt平台抽象,您可以为嵌入式系统开发自己的插件。它基本上取代了平台端口。

QPA在QT5中得到了很好的发展,也许你可以考虑使用它。您需要自己解决这些编译问题,如果您正在计划如何使用QPA,最小的插件是最好的选择。

您可以通过包括ApplicationService框架和标头来解决这些问题。希望这能有所帮助。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22101723

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档