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

  • Home
  • SEARCH
  • 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 310845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:52:15+00:00 2026-05-12T07:52:15+00:00

I’m writing a graphical application using Objective-C for the front end and C++ for

  • 0

I’m writing a graphical application using Objective-C for the front end and C++ for the graphics processing and network communication. I read around on Apple’s site looking for a way to link either a .dylib or .so with my C++ code in it to my Xcode project, but nothing seemed to work. I was able to get the project to reference it and link against it, but when I tried to call functions from that .dylib, it was saying that it didn’t know what I was trying to do. Does anyone know what is going on here?

I know that Objective-C has all the libraries I would need to do graphics and networking, but I just feel like doing it like this. I haven’t done much C++ in a while and I want to learn more Objective-C, so what better way than to use them together?

Thanks,
Robbie

  • 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-12T07:52:15+00:00Added an answer on May 12, 2026 at 7:52 am

    You’re going to hit one obstacle in the form of what’s called “name mangling”. C++ stores function names in a way not compatible with Obj-C.

    Objective-C doesn’t implement classes in the same way as C++, so it’s not going to like it.

    One way around this is to implement a set of simple C functions which call the C++ functions. It’ll be a good challenge to keep the number of C functions as low as possible! You’ll end up with a nice compact interface! 🙂

    To declare these functions in a C++ file, you’ll need to mark them as C with:

    extern "C" int function_name(char *blob,int number, double foo) {...}
    

    This disables the standard name-mangling.

    Build a header file with the prototypes for all these functions that you can share with your objective C code.

    You won’t be able to pass classes around in the same way (because your ObjC code can’t use them), but you’ll be able to pass pointers (although you might have to lie about the types a little).

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

Sidebar

Ask A Question

Stats

  • Questions 205k
  • Answers 205k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer there are few techniques to implement the comet concept. you… May 12, 2026 at 8:57 pm
  • Editorial Team
    Editorial Team added an answer so, I came with this workaround for the "empty scrollable… May 12, 2026 at 8:57 pm
  • Editorial Team
    Editorial Team added an answer I don't have an IDE in front of me right… May 12, 2026 at 8:56 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.