Re: Not finding libraries
Re: Not finding libraries
- Subject: Re: Not finding libraries
- From: Howard Moon <email@hidden>
- Date: Thu, 29 Dec 2016 10:31:46 -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.)
-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