• 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 to a static lib and *not* a dynamic lib when both are present
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linking to a static lib and *not* a dynamic lib when both are present


  • Subject: Re: linking to a static lib and *not* a dynamic lib when both are present
  • From: Tyler Daniel <email@hidden>
  • Date: Fri, 21 Mar 2008 20:07:19 +0900

Hi, thanks for the response!

As far as I'm aware, there are three ways to link to a static library
rather than a dynamic one:
1) Specify the library to the linker by full name and path.  Since
Xcode is a sort-of-GUI application, this isn't easy.
2) Rename the static library to something unique.
3) Delete the dynamic library.

It seems my fears are substantiated. At version 3.0, I guess the Xcode team doesn't consider the inability to specify the type of library a bug. I hope that changes in the future, and in the meantime I'd say that the UI is a bug, showing libsomething.a in the Link Binary with Libraries stage when the decision is actually left up to the filesystem. Anyway I hope this post helps someone else out as the other stuff I could find is really old, and Xcode is changing fast.


Also for posterity's (google's) sake, in my case I solved the immediate problem by doing what you probably mean by 1). I added the static libraries (path + filename) to "Link->Other Linker Flags". IMO this is a cleaner solution than the Apple-recommended "put the static libs in a separate directory searched first" since 1) moving/renaming/ deleting libraries is not always an option and 2) at least this way Xcode isn't actively misleading with its list in the project window.

Here's hoping things get better in 3.1!

tyler
_______________________________________________
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: linking to a static lib and *not* a dynamic lib when both are present
      • From: Ladd Van Tol <email@hidden>
References: 
 >linking to a static lib and *not* a dynamic lib when both are present (From: Tyler Daniel <email@hidden>)
 >Re: linking to a static lib and *not* a dynamic lib when both are present (From: "Mark Wagner" <email@hidden>)

  • Prev by Date: Re: A Byte out of USB
  • Next by Date: Instruments hangs and fills up /var/log/system.log when saving trace document
  • Previous by thread: Re: linking to a static lib and *not* a dynamic lib when both are present
  • Next by thread: Re: linking to a static lib and *not* a dynamic lib when both are present
  • Index(es):
    • Date
    • Thread