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 8799425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:19:14+00:00 2026-06-14T00:19:14+00:00

In my iOS project I need to use a C++ library consisting in some

  • 0

In my iOS project I need to use a C++ library consisting in some header (.h) files and a .a library file (I don’t have any actual source code).

In my Obj-c code I imported the .h header that I need, however Xcode doesn’t seem to understand it has to interpret the header as c++, in fact it returns an endless list of issues including “not found” errors on inclusions like theese:

#include <string>
#include <vector>

and other c++ language-specific syntax.
Unfortunately changing the .h extension to .hpp doesn’t solve the issue, and neither setting the file type to “C++ Header” in the Xcode file inspector does.

Any suggestion? Is there any flag I need to set somewhere to manually indicate to use g++ on the library files? Thanks.

  • 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-06-14T00:19:15+00:00Added an answer on June 14, 2026 at 12:19 am

    You can import C++ headers only in Objective-C++ files, change your objc-file extension to .mm.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of code in an iOS project (named MyLibs) I re-use
I want to use the ASSIMP library http://assimp.sourceforge.net in an iOS project. Unfortunately, I'm
I'm working on an iOS project and need to supply a file path for
I'm a iOS Application developer.I need some similar tasks in many projects as example
I have an iOS project to open and when i open it i get
I have inherrtied an IOS project that was being built primarly for iphone. When
I have an iOS project in Xcode that works great. I added the classes
In an iOS Project with folders containing *.m files, similar to packages, one will
Overview I have an iOS project which contains 2 navigation controllers as shown in
For one of my current iOS project, some business logic has been provided to

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.