Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6145083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:44:42+00:00 2026-05-23T18:44:42+00:00

I have an XCode project ( Objective-C ) to which I’m trying to add

  • 0

I have an XCode project (Objective-C) to which I’m trying to add a C++ library I’ve coded earlier. As soon as I add a single .cpp or .mm file, the build process will trip up on random things, usually when building the prefix header. The same thing happens when I include .c files. Basically, I can only use .m files in my target. The last error I’ve got was:

SDKpath/public/CoreGraphics.framework/Headers/CGFont.h:53:

error: expected constructor, destructor, or type conversion before ‘;’ token

The code at that line being:

CG_EXTERN CGFontGetGlyphsForUnichars(CGFontRef font, void* chars, CGGlyph* glyphs, int len)
CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0);

I’m pretty sure that the code isn’t what caused that issue, but I can’t figure out what is wrong with my build settings. If I get rid of that include, then the build process will trip on the first bit of Objective-C code it gets to.

This is my prefix header:

#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <IOSurface/IOSurfaceAPI.h>
#import "CGColorUtil.h"
#endif
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:44:43+00:00Added an answer on May 23, 2026 at 6:44 pm

    I’m an idiot. For some reason the return type was missing from the function.

    CG_EXTERN void CGFontGetGlyphsForUnichars(CGFontRef font, void* chars, CGGlyph* glyphs, int len)
    CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Objective-C xcode project I have a plist file with which associates integers with
I have an xcode Objective-C iPhone static library project. When I build it in
I have an Objective-C++ project in Xcode which compiles fine when on the normal
I have an Xcode project with several static library dependancies set up in the
I have an iPhone project (Xcode, Objective C++) with two targets - A and
I have an Xcode project which builds a Cocoa desktop Browser application. My Browser
I have an Objective C static library that I am trying to import into
I have an Xcode project for my Cocoa application. It's all Objective-C so far.
In an Xcode project I have a C file with functions, it compiles and
I have an Xcode project with the following group structure: ProjectName/ Classes/ class1.h class1.m

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.