• 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: Linking CFBundle with static libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking CFBundle with static libraries


  • Subject: Re: Linking CFBundle with static libraries
  • From: frank <email@hidden>
  • Date: Thu, 4 Dec 2008 10:48:54 +0000

On 4 Dec 2008, at 05:33, Nick Zitzmann wrote:


On Dec 3, 2008, at 7:33 AM, frank wrote:

The reason I have elected to use CFBundle is that I require the ability to load and unload plugins and as far as I have seen, this is
not possible with NSBundle. See:

It doesn't matter; CFBundle and NSBundle are two sides of a coin. They aren't toll-free bridged, however.


And C and C++ bundles can be unloaded. In Tiger and earlier, Objective-C bundles couldn't be unloaded in any way whatsoever. I'm not sure if this was addressed in Leopard.

ld: absolute addressing (perhaps -mdynamic-no-pic) used in ___tcf_0 from /Users/botmanx/Documents/src/trunk/Build/Debug/libboost- filesystem.a(error_code.o) not allowed in slidable image. Use '- read_only_relocs suppress' to enable text relocs

On seeing this, I added the '-read_only_relocs suppress' CFlag to my build options as the compiler suggested but the error remains.
Does anyone know how I might get around this problem?


Are you sure the static library was built correctly? Libraries of any sort cannot contain position-independent code, and that linker error suggests that the static library was compiled with the - mdynamic-no-pic option. Do you have the source code for the static library?

Nick Zitzmann
<http://www.chronosnet.com/>


Hi Nick,

the problem was with the way I was building my libraries; I was using the "Generate Position-Dependent Code" from the "GCC 4.0 Code Generation" options. Once I disabled this my bundle built without any problems.

Thanks for your help!

Best Regards,
Frank




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Linking CFBundle with static libraries
      • From: Nick Zitzmann <email@hidden>
References: 
 >Linking CFBundle with static libraries (From: frank <email@hidden>)
 >Re: Linking CFBundle with static libraries (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Determining unreleased objects after Quit
  • Next by Date: Re: Programmatically loading an NSImage via other field
  • Previous by thread: Re: Linking CFBundle with static libraries
  • Next by thread: Re: Linking CFBundle with static libraries
  • Index(es):
    • Date
    • Thread