Expected function body after function declarator e

2019-09-02 14:22发布

问题:

I downloaded the class files and demo program here: http://github.com/matej/MBProgressHUD

When I try to compile the program, I get several errors. The first one appears here:

CG_EXTERN void CGPDFContextAddDocumentMetadata(CGContextRef context,
  CFDataRef metadata) CG_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_0);

On the second line the error is "Expected function body after function declarator."

What's wrong with this code? How can it be fixed?

回答1:

In the project build settings, change the compiler version to the system default.

If you have access to Apple's Dev Forums for the Xcode betas, you can find more info and an alternative solution at https://devforums.apple.com/message/287160#287160.