• 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: Why isn't "lib" prefixed to Dynamic Library targets in Xcode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why isn't "lib" prefixed to Dynamic Library targets in Xcode?


  • Subject: Re: Why isn't "lib" prefixed to Dynamic Library targets in Xcode?
  • From: Scott Tooker <email@hidden>
  • Date: Sat, 26 Mar 2005 11:51:54 -0800

AFAIK, only static libraries are prepended with "lib", not dynamic libraries. I think the problem is that you are trying to reference a dynamic library with -lfoo, which is meant for static libraries. I believe -dylib is the correct flag when referencing dynamic libraries.

In any case, if you are doing this all through Xcode, you shouldn't have to worry.

Scott

On Mar 25, 2005, at 11:13 AM, Dave Thorup wrote:

This seems like a bug to me, but I may be wrong as I don't have a lot of experience with creating and using dynamic libraries. So feel free to correct me if I'm wrong.

When you create a Dynamic Library project in Xcode (1.5) the final product is built without prefixing "lib" to its name. For example if I create a Dylib project called Foo then the library that it builds is Foo.dylib, but shouldn't it be libFoo.dylib?

If I then try to take the Foo.dylib library and add it to another Xcode project then Xcode won't be able to find the library at link time. The linker flag will be "-lFoo" which means that the linker will search for libFoo.dylib, not Foo.dylib. Is this a bug in Xcode? If it is then I'll report it, but if it isn't then please tell my why.

Thanks!
_____________________________

Dave Thorup
Software Engineer
email@hidden

http://www.kuwan.net
Defaults Manager - The premier editor for Mac OS X's User Defaults / Preferences database.


_______________________________________________
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


_______________________________________________ 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: Why isn't "lib" prefixed to Dynamic Library targets in Xcode?
      • From: Dave Thorup <email@hidden>
References: 
 >Why isn't "lib" prefixed to Dynamic Library targets in Xcode? (From: Dave Thorup <email@hidden>)

  • Prev by Date: Re: Xcode 2.0 Questions and Wishlist
  • Next by Date: Re: Xcode 2.0 Questions and Wishlist
  • Previous by thread: Why isn't "lib" prefixed to Dynamic Library targets in Xcode?
  • Next by thread: Re: Why isn't "lib" prefixed to Dynamic Library targets in Xcode?
  • Index(es):
    • Date
    • Thread