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

Re: Not finding libraries


  • Subject: Re: Not finding libraries
  • From: Howard Moon <email@hidden>
  • Date: Thu, 29 Dec 2016 10:45:29 -0800

>
>>>
>>> Now, though, even though I can see that the linker statement includes the correct -L<path> for each of those paths, it fails to find my libraries.
>>
>> Search paths are for _dynamic_ libraries. Static libraries are treated the same as compiled source files (“.o”) by the linker, i.e. they get included in the list of input files.
>>
>> To include a static library in a target, all you should need to do is add the library to the project and make sure it’s included in the list of libraries in that target’s Build Phases.
>>
>> I’ve sometimes seen a problem where Xcode thinks a “.a” file is a dynamic library, which causes the linker to ignore it. You can fix that by changing the file’s type to “Mach-O Object Code” in the file inspector in the right-hand pane.
>>
>
> Unfortunately, when I do that (which is actually what I did at first), it does not let me specify a different library for the Debug versus the Release build. I either select the Release or the Debug, and that is used for all configurations, as far as I can tell.
>
> (Also, doing that does put entries in the Library Search Paths settings, but breaks them apart into separate lines in the UI due to the spaces in the paths.)
>

On top of that, it still won’t build because of those spaces. If I go into the settings and re-combine and quote those paths in the Library Search Paths, then it builds, this time. But if I close and re-open the project, it adds those escape characters to the quotes and spaces again, and then fails to build. Again. Every time I open, I have to remove those escape characters.

> -Howard
>


 _______________________________________________
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: Not finding libraries
      • From: Alex Zavatone <email@hidden>
    • Re: Not finding libraries
      • From: Jens Alfke <email@hidden>
References: 
 >Not finding libraries (From: Howard Moon <email@hidden>)
 >Re: Not finding libraries (From: Jens Alfke <email@hidden>)
 >Re: Not finding libraries (From: Howard Moon <email@hidden>)

  • Prev by Date: Re: Not finding libraries
  • Next by Date: Re: Not finding libraries
  • Previous by thread: Re: Not finding libraries
  • Next by thread: Re: Not finding libraries
  • Index(es):
    • Date
    • Thread