• 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:47:50 -0800

That was it!

Thanks for the help.



Bob



On Dec 21, 2006, at 10:13 AM, M. Uli Kusterer wrote:

On 21.12.2006, at 18:52, bob piatek wrote:
I've created a framework using the 'Cocoa Framework' template in Xcode.

I can now use this framework from my Cocoa application and from a straight 'C' command line tool. However, if I try to call it from an application created with the C++ command line tool template, I get lots of errors from the linker claiming that it can't find the exported symbols from my framework.

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

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.

Cheers,
-- M. Uli Kusterer
"The Witnesses of TeachText are everywhere..."





_______________________________________________ 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: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Universal Binary for 10.2.8 and Later - how to set project options?
  • Next by Date: Re: 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: Universal Binary for 10.2.8 and Later - how to set project options?
  • Index(es):
    • Date
    • Thread