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

Re: static libraries


  • Subject: Re: static libraries
  • From: Andreas Grosam <email@hidden>
  • Date: Sat, 22 Oct 2005 04:01:25 +0200


On 22.10.2005, at 00:46, Steve Checkoway wrote:

I'm trying to link a few static libraries that I've built for a particular project. I dragged the libraries into my XCode project and built. XCode didn't use those libraries but passed -llibrary to ld. I never would have noticed that XCode did not do what I wanted except that one of the libraries does not exist in the standard library paths.

More concretely, I built libpng.a and dragged that into my project. I was expecting to see /path/to/libpng12.a as an argument to ld. Instead, I see -lpng12.

Yes, that's what happening. A library path will not be set.

You need to carefully set the library search paths, ensuring there is no conflict with an existing library having the same canonical name.



Is there a way to get XCode to do what I told it to do, namely, use the static library I included in the project, or do I need to pass '-L/path/to -search_paths_first' to ld? Since this is going though gcc first, I suppose I'd need to put '-L/path/to -Wl,-search_paths_first' in the LDFLAGS.

Guess, we need to *explicitly* specify
-L<lib-path> -l<name>
tupels in the "Other Linker Flags" build settings in order to ensure that a certain library will be selected.
(the -Wl, syntax is not necessary, though)



I would appreciate it if Xcode could manage this for us.

Regards
Andreas




- Steve _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


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: static libraries
      • From: Steve Checkoway <email@hidden>
References: 
 >static libraries (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: Memory debugging problems
  • Next by Date: Re: Speeding up XCode?
  • Previous by thread: static libraries
  • Next by thread: Re: static libraries
  • Index(es):
    • Date
    • Thread