• 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: Dave Thorup <email@hidden>
  • Date: Tue, 29 Mar 2005 14:44:31 -0500

On Mar 26, 2005, at 2:51 PM, Scott Tooker wrote:

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.

But I am doing this all through Xcode which is why I'm worrying. ;) I'm not the one trying to reference a dylib with -lfoo, Xcode is the one doing it. I'm just copying the content from the build log in Xcode. Whenever Xcode goes to link my dylibs it alwas does -l<lib name>.


So if I create a dylib using Xcode's template, Xcode will build a library that doesn't start with lib, ex: Foo.dylib. Then if I drag Foo.dylib into another Xcode project and then try to build that project then Xcode will give me a link error because the link stage passed the flag "-lFoo" which is really looking for "libFoo.dylib". Somewhere there's a problem with Xcode. Either the Dynamic Library template should create dylibs that start with "lib" or Xcode should try to link dylibs with the "-dylib" flag (assuming that works).

I also just took a look at /usr/lib and all of the .dylibs there start with "lib". Whatever it is there is a bug somewhere.
_____________________________


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


References: 
 >Why isn't "lib" prefixed to Dynamic Library targets in Xcode? (From: Dave Thorup <email@hidden>)
 >Re: Why isn't "lib" prefixed to Dynamic Library targets in Xcode? (From: Scott Tooker <email@hidden>)

  • Prev by Date: Re: can't open library
  • Next by Date: Re: Xcode-users Digest, Vol 2, Issue 107
  • Previous by thread: Re: Why isn't "lib" prefixed to Dynamic Library targets in Xcode?
  • Next by thread: Xcode 1.5 and CVS
  • Index(es):
    • Date
    • Thread