• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: can't call framework from cpp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can't call framework from cpp


  • Subject: Re: can't call framework from cpp
  • From: bob piatek <email@hidden>
  • Date: Thu, 21 Dec 2006 10:46:25 -0800

I forgot to mention that I'm just using plain vanilla 'C' code in my framework.

It looks like the suggestion M. Uli Kusterer had was my problem.


C++ mangles names. To (Objective) C, you need to wrap it in

extern "C"
{
// C (proto)types go here
}

See any of Apple's headers for an example.




Bob



On Dec 21, 2006, at 10:10 AM, Alexander v. Below wrote:


Am 21.12.2006 um 18:52 schrieb bob piatek:

Do I need to do something special when building my framework in order to use it from a C++ app?

Well, you must not link it against Cocoa Frameworks, and you must not use the Objective-C runtime. Doing either is bound for failure in C/C++ projects

Alex


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >can't call framework from cpp (From: bob piatek <email@hidden>)
 >Re: can't call framework from cpp (From: "Alexander v. Below" <email@hidden>)

  • Prev by Date: Re: can't call framework from cpp
  • Next by Date: Universal Binary for 10.2.8 and Later - how to set project options?
  • Previous by thread: Re: can't call framework from cpp
  • Next by thread: Re: can't call framework from cpp
  • Index(es):
    • Date
    • Thread