• 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: Statically linking *Obj-C* lib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Statically linking *Obj-C* lib


  • Subject: Re: Statically linking *Obj-C* lib
  • From: Jared Watts <email@hidden>
  • Date: Thu, 10 Feb 2005 08:30:40 +1300

You can use the following linker option:

	-ObjC

Regards,

Jared Watts.


On 10/02/2005, at 12:31 AM, Steven Kramer wrote:


Hi all,

Is there an (easy) way to link in Obj-C classes and categories from a *static* library that have no direct dependencies in the application? The problem is that classes from the library that are referenced only indirectly (e.g., in a NIB file) are not linked in. I might be able to solve this with a lot of export directives, but that's really not the way to go.

IIRC ld links at module level, so I might be able to force a dependency on each .mm file by including a (C++) global with initializer or something like that. But I'm sure there must be an even easier way than that... right?


Regards,

Steven Kramer

--
email@hidden
http://sprintteam.com/

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



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Statically linking *Obj-C* lib (From: Steven Kramer <email@hidden>)

  • Prev by Date: Re: spawing a server...
  • Next by Date: Re: NSTableView scrollRowToVisible
  • Previous by thread: Statically linking *Obj-C* lib
  • Next by thread: Do I need to use Distributed Objects or not?
  • Index(es):
    • Date
    • Thread