• 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: Compilation leads to Undefined symbols of a nested static lib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation leads to Undefined symbols of a nested static lib


  • Subject: Re: Compilation leads to Undefined symbols of a nested static lib
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Sun, 16 Mar 2008 16:44:09 +0100


Le 16 mars 08 à 16:38, Alfred Van Hoek a écrit :

Have created a static lib (Carbon) that wraps calls into Cocoa, "libMycarboncocoa.a". This static lib is used by a carbon static lib, which is called "libMylib.a". When "MyFramework.bundle" is compiled, Xcode complains that there are undefined symbols when libMylib.a calls into libMycarboncocoa.a. Previously, when we did not use libMycarboncocoa.a, MyFramework.bundle compiled fine with libMylib.a.

Any suggestions?

Alfred

When you link your main bundle on your static library, The linker is smart enought to strip unused function and so, it do not try to link symbols used in those stripped functions.
There is probably functions in libMycarboncocoa.a that need Cocoa.framework (or another framework). As long as you don't call thoses function, your main bundle will not need Cocoa, but if your bundle uses one if thoses function, it will require Cocoa to link.


So adding Cocoa.framework in your bundle project should solve your problem.

(Note: maybe the missing symbol is not from Cocoa but from another framework, but as you didn't give any hint about what symbol it is, I guess it's a Cocoa symbol ;-)).

_______________________________________________
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


  • Follow-Ups:
    • Re: Compilation leads to Undefined symbols of a nested static lib
      • From: Alfred Van Hoek <email@hidden>
References: 
 >Compilation leads to Undefined symbols of a nested static lib (From: Alfred Van Hoek <email@hidden>)

  • Prev by Date: Compilation leads to Undefined symbols of a nested static lib
  • Next by Date: Re: Compilation leads to Undefined symbols of a nested static lib
  • Previous by thread: Compilation leads to Undefined symbols of a nested static lib
  • Next by thread: Re: Compilation leads to Undefined symbols of a nested static lib
  • Index(es):
    • Date
    • Thread