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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:23:21+00:00 2026-05-25T13:23:21+00:00

I need to mix cpp and objective-c in one header file and mm file,

  • 0

I need to mix cpp and objective-c in one header file and mm file, (CFacebookInterface.h,CFacebookInterface.mm)

but if I add a BOOL OR NSURL in header file.
I get a error ” BOOL” does not name a type AND “NSURL” does not name a type

IF I #import Foundation/NSURL.h in this header then “GET 375 ERROR “

IF I #import Foundation/Foundation.h then “COMPILING WILL GET 999+ ERROR “

and all the errors are occured in ios`s framework class like NSZone.h,NSObject.h etc..

Anybody can help …thanks very much….

//#import <Foundation/Foundation.h> //GET  999+ ERROR 
//#import <Foundation/NSURL.h>   //GET  375 ERROR 

#import <SocialInterface.h>



class CFacebookInterface : public SocialInterface 
{
public:
    CFacebookInterface();
    virtual ~CFacebookInterface();

public:
    virtual void        setAppID(CStrWChar key);
    virtual const char* getAttributeName();
    virtual const char* getUserAliasAttributeName();
    virtual void        login();
    virtual void        finishLogin();
    virtual void        logout();
    virtual void        finishLogout();
    virtual void        loadFriends();
    virtual void        finishLoadFriends();
    virtual int32       getConnectionState();
    virtual CStrWChar   getPlayerID();
    virtual CStrWChar   getPlayerAlias();
    virtual int32       getFriendsCount();
    virtual CStrWChar   getFriendIDAtIndex( int index );
    virtual void        postMessage();
    virtual void        postMessage(const CStrWChar & msg);
    virtual void        FinishPostMsg(boolean suc);
    virtual void        resume();

  BOOL              handleOpenURL(NSURL* url);

};

#endif //__FACEBOOKINTERFACE__
  • 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-25T13:23:22+00:00Added an answer on May 25, 2026 at 1:23 pm

    Rename your .cpp files to .mm to have access to both, Objective-C and C++.

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

Sidebar

Related Questions

I'm developing a web application and I need to mix Forms & Windows authentication
I am writing a game in iPad using cocos2d. I need to mix two
I need to find a video filter in order to mix multiple video streams
I need some help understanding the correct way to mix variables with strings like
I need to develop a flex component which can take two videos and mix
Occasionaly I find that I need a generic pass through-interface. For example for mix-in
I have a PHP file with a mix of html, text and php includes
I need to write GUI applications for cross platform in C++ but since most
I need to transfer a column from one table to another. The source table
i need to get the streaming from 2 webcams on the same computer, and

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.